首页 > 其他 > 详细

实现进制转化伪代码

时间:2020-11-08 22:31:58      阅读:31      评论:0      收藏:0      [点我收藏+]

伪代码如下
Write "Enter the new base"
Read newBase
Write "Enter the number to be converted"
Read decimalNumber
Set quotient to 1
WHILE (quotient is not zero)
Set quotient to decimalNumber DIV newBase
Set remainder to decimalNumber REM newBase
Make the remainder the next digit to the left in the answer
Set decimalNumber to quotient
Write "The answer is "
Write answer

运行结果截图如下
技术分享图片
技术分享图片
技术分享图片

实现进制转化伪代码

原文:https://www.cnblogs.com/qwer6653/p/13944633.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!