Answer to Question #301126 in Python for sashi

Question #301126

you are given two integers, a and b. print the smallest value among a%b and b%a.


1
Expert's answer
2022-02-22T07:34:55-0500
a = 1234
b = 678

x = a%b if a%b < b%a else b%a

print('a =', a, 'b =', b)
print('Smallest value among a%b and b%a is', x)

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