题解 | #反向输出一个四位数#
反向输出一个四位数
https://www.nowcoder.com/practice/1f7c1d67446e4361bf4af67c08e0b8b0
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a;
cin>>a;
while(a!=0)
{
cout<<a%10;
a/=10;
}
return 0;
}
简单的代码。
