how do i create a recursive function called printOctal that converts a decimal to a octal number

前端 未结 0 1222
执念已碎
执念已碎 2020-12-01 12:42
def printOctal(x):
    if (x > 1):
        printOctal(x//8)
    stdio.writeln(str(x%8)
    return

this is current code i had which inputted x int

相关标签:
回答
  • 消灭零回复
提交回复
热议问题