首页 > 其他 > 详细

实现进制转换伪代码

时间:2020-11-08 23:34:44      阅读:63      评论:0      收藏:0      [点我收藏+]

用Python或Scratch实现下面伪代码描述的进制转换程序,提交运行结果截图,至少三张,包含转换为二进制,八进制,十六进制的截图。

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/s-j-y/p/13944691.html

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