#include "stdafx.h"
#include<iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int a, b;
int c, d, e;
cout << "请输入一个三位数" << endl;
cin >> a;
c = a % 10 * 100;
d = a / 100;
e = a % 100 / 10 * 10;
b = c + d + e;
cout << b;
return 0;
}
#include<iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int a, b;
int c, d, e;
cout << "请输入一个三位数" << endl;
cin >> a;
c = a % 10 * 100;
d = a / 100;
e = a % 100 / 10 * 10;
b = c + d + e;
cout << b;
return 0;
}
三位逆序数 需要 输入 输出 ,将个位转化为百位,十位不变,百位为个位
个位转化 取余
百位转化 ÷
十位转化**取余后相除再乘 利用整除消掉原有的个位