simple reverse string algorithm

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; int main () { string word; cout << "Please enter a 5-letter word." << endl; cin >> word; cout << "The original word is " << word << "." << endl; word = string (word.rbegin(),word.rend()); cout << "The word in reverse order is " << word << "." << endl; return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines