【题目描述】
小红有一个三位数,她想让聪明的你反向输出这个三位数。
【输入格式】
一个三位数n(99<n<1000)
【输出格式】
反向输出n,保留前导0
【输入样例】
123(注意题目没有说明 多组输入)
【输出样例】
321
#include<iostream>
using namespace std;
int main()
{
int a;
while( cin >> a)
{
int b = a % 10;
int c = a / 10 % 10;
int d = a / 100;
cout << b << c << d << endl;
}
return 0;
}