其他分享
首页 > 其他分享> > 进制转换

进制转换

作者:互联网

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

标签:转换,进制,Read,Write,Enter,answer,decimalNumber,quotient
来源: https://www.cnblogs.com/zhilan/p/13945420.html