#include <iostream>
using namespace std;
void fan(char a[])
{
int i = 0;
int j = 0;
char t;
while (a[i] != '\0')
i++;
i--;
for(j=0;j<i/2;j++)
{
t = a[j];
a[j] = a[i - j];
a[i-j] = t;
}
}
int main()
{
cout << "输入一串字符串" << endl;
char ch[80];
gets_s(ch);
fan(ch);
cout << "反向输出为:" << endl;
puts(ch);
return 0;
}