Quick actions

cmd+k|ctrl+k

Navigation

Languages

simple reverse string algorithm

Snippet info

Language

Cpp

Visibility

public

Author

aventus

Created

2019-05-13T19:51:52Z

Updated

2019-05-14T04:13:47Z

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

     
INFO