其他分享
首页 > 其他分享> > 进制转换为伪代码

进制转换为伪代码

作者:互联网

实现进制转化伪代码
作业要求
用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),来获得对应的进制数。

标签:Set,转换,进制,代码,Write,answer,quotient,decimalNumber
来源: https://www.cnblogs.com/killerqueen4/p/13941838.html