实现进制转化伪代码

实现进制转化伪代码

作业要求

  • 用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

作业如下

  • 运用连续除以基数(2,8,16),来获得对应的进制数。

  •  

     

     

     

posted @ 2020-11-03 22:00  给我个名字  阅读(170)  评论(0编辑  收藏  举报