题解 | 反向输出一个四位数
反向输出一个四位数
https://www.nowcoder.com/practice/1f7c1d67446e4361bf4af67c08e0b8b0
#include <iostream>
#include <cmath>
using namespace std;
int main() {
int a;
cin>>a;
int b=a%10;
int e=a/1000;
int d=a/100-10*e;
int c=a/10-100*e-10*d;
cout<<b<<c<<d<<e;
return 0;
}
// 64 位输出请用 printf("%lld")
海康威视公司氛围 1014人发布