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;
}


Click here to run this code



More Free Code Examples:


Python Code to Reverse a String


C++ Guess the Number


C++ Odd or Even



Comments

Popular posts from this blog

Multi-tap Keypad Text Entry

Crypto Mining