#B1741. 求一个10位数的反转数.填空题
求一个10位数的反转数.填空题
题目描述
求一个 10 位数的反转数。
输入格式
一个 3 位整数 n ,保证个位不为 0 。
输出格式
一个整数。
样例
123
321
补充要求
反转数如果有前导 0 ,需要删除前导 0。
完善程序
#include<bits/stdc++.h>
using namespace std;
int n,ans;
int main()
{
cin>>n;
for(int i=1;填空(1);i++)
{
ans = 填空(2) + n%10;
n = 填空(3);
}
cout<<填空(4);
return 0;
}
填空(1):{{ input(1) }}
填空(2):{{ input(2) }}
填空(3):{{ input(3) }}
填空(4):{{ input(4) }}