数字颠倒
程序员文章站
2022-07-13 15:20:52
...
#include <iostream>
using namespace std;
char t[32];
int main()
{
int a,k = 0;
cin>>a;
while(a)
{
int temp = a % 10;
t[k] = temp + '0';
k++;
a = a / 10;
}
cout<<t;
return 0;
}