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