your given two integers. a and b print the smallest among a%b and b%a
1
Expert's answer
2021-11-11T07:30:36-0500
a = int(input("Enter a: "))
b = int(input("Enter b: "))
a_b = a % b
b_a = b % a
if a_b < b_a:
print('The smallest is a%b:', a_b)
else:
print('The smallest is b%a:', b_a)
Comments
Leave a comment