Answer to Question #264407 in Python for gopi

Question #264407

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)

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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS