#include
#include <Windows.h>
#include
using namespace std;
int main(void) {
string str;
int j;
int i;
char age;
cout << "请输入一个整数字符串:";
cin >> str;
i = 0; //初始
j = str.length() -1; //提取数字字符串
while(j > 0) {
age = str[i];
str[i] = str[j];
str[j] = age;
++i; //前进
--j; //后退
}
//打印输出
cout << str << endl;
system("pause");
return 0;
}
/**
输入一个字符串,然后把这个字符串逆转输出
123456789
987654321
**/