Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- string name;
- cout << "Enter some word\n";
- cin >> name;
- for ( int counter = name.length() - 1; counter >= 0; counter --)
- {
- cout << name[counter];
- }
- cout << endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment