Python模除法如何表示商和重绑定

2024-04-28 04:24:34 发布

您现在位置:Python中文网/ 问答频道 /正文

编写一个程序,提示用户输入两个数字,一个分子和一个除数。然后,程序应该将分子除以除数,并显示商和余数。在

到目前为止我有这个。。。。在

numerator = int(input("Enter your numerator: "))
divisor = int(input("Enter your divisor: "))

print(numerator%divisor)

*如何得到商和余数来显示???在


Tags: 用户程序inputyour数字分子divisorint