题目
编写程序,从键盘输入一个三位数,求出其逆序数并输出,例如输入123,输出321.
提问时间:2020-10-22
答案
int main()
{
int n,n1,n2;
cin>>n1;
n2 = n1%100;
n1 = n1/100;
n = n1;
n2 = n2%10;
n1 = n1/10;
n = n + 10*n1 + 100*n2;
return n;
}
{
int n,n1,n2;
cin>>n1;
n2 = n1%100;
n1 = n1/100;
n = n1;
n2 = n2%10;
n1 = n1/10;
n = n + 10*n1 + 100*n2;
return n;
}
举一反三
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
1,人们染上烟瘾,最终因吸烟使自己丧命.
最新试题
热门考点
- 1专心的近义词
- 2再见了亲人小练笔怎么写?
- 3作文 成长的季节 700字左右
- 4降雨量是如何测定的?
- 5带刀有哪些成语
- 6last night/announced/that/on saturday/on television/the newscaster/would/the leader/arrive
- 7she need to see a doctor 这里是用need应用needs
- 8Dear,I am more than happy in your reply to my mail.How are you this morning How was the night
- 9a=13 b=6 a
- 10海子的麦地有几首诗?