C++ Code to Reverse a String
Reverse a String using C++
* Featured Code Example Created and submitted by Nitrocell via Sololearn.
C++
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
void ReverseSystem() {
cout << "Type what you want to reverse: " << endl;
string tool;
cin >> tool;
reverse(tool.begin(), tool.end());
cout << "Reverse:\n\n" << tool << endl;
}
int main(void) {
ReverseSystem();
return 0;
}
Comments
Post a Comment