Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- string s1;
- int numChar;
- getline(cin,s1);
- numChar = s1.length();
- for(int i = numChar - 1; i >= 0; i--) {
- cout << s1[i];
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment