Answer in Python for gopi #264407
January 26th, 2023
your given two integers. a and b print the smallest among a%b and b%a
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)