题目描述
将一个字符串str的内容颠倒过来,并输出。str的长度不超过100个字符。
输入
输入包括一行。 第一行输入的字符串。
输出
输出转换好的逆序字符串。
样例输入
I am a student
样例输出
tneduts a ma I
# include <iostream>
# include <cstring>
using namespace std;
int main ()
{
char a[101];
cin.getline(a,101,'\n');
for(int b=strlen(a)-1;b>=0;b--)
{
cout<<a[b];
}
}