写一个程序,提示用户输入两个数字,一个分子和一个除数。然后,您的程序应将分子除以除数,并显示商和余数。
到目前为止,我有这个……
numerator = int(input("Enter your numerator: "))
divisor = int(input("Enter your divisor: "))
print(numerator%divisor)*如何获得要显示的商和余数?
发布于 2020-07-24 15:09:20
num=int(input("Enter a number"))
den=int(input("Enter another number"))
print("The answer is " + str(num//den) + " R " + str(num%den))https://stackoverflow.com/questions/58116572
复制相似问题