Title description
Write a program that accepts a string, and then outputs the inverted string. (The string length does not exceed 1000)
Enter description:
Enter N characters
Output description:
Output the inverted string
Example 1
Input
abcd
Output
dcba
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
string s;
getline(cin ,s);
reverse(s.begin(),s.end());
cout << s << endl;
return 0;
}