编写一个C ++程序,以将键盘上读取的任何数字保存为另一个相反的数字. [英] Write a C++ program to save any read number from the keyboard in another number reversed.

查看:62
本文介绍了编写一个C ++程序,以将键盘上读取的任何数字保存为另一个相反的数字.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编写一个C ++程序,以将键盘上的任何读取数字保存为另一个相反的数字.
订单(数字可以是任意长度)
您应该创建另一个整数并将其以相反的顺序保存在内部.
定义新数字,power = 0
使用循环并使用%和/
操作 让新数字(X)
X = X +数字* 10 ^次幂
令功率=功率+1
返回到(1)
打印新号码

Write a C++ program to save any read number from the keyboard in another number reversed.
Order( The number could be of any length)
You should create another integer number and save the number in reversed order inside.
Define the new number , power=0
Use a loop and use the operation % and /
Let the new number (X)
X=X + the digit * 10 ^ power
Let power = power + 1
Return to (1)
Print the new number

推荐答案

转到此处 [ ^ ]


是不是天生的程序员? ?我认为即使你不是一个好人,还是个好人.有人渴望成为一名程序员,这是我们应该支持并向他提供帮助的动机,但又不要阻止他.科学是我们的普遍财产,没有人有权使用它.
Is anyone born programmer? I think that it is good to be one even if you are not a good one. The fact that someone aspire to be a programmer is a motive that we should support and provide him with help but not discourage him. Science is our universal property and no one has the right to appropriate it.


这篇关于编写一个C ++程序,以将键盘上读取的任何数字保存为另一个相反的数字.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆