Question #264407

your given two integers. a and b print the smallest among a%b and b%a


Expert's answer

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)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS