The value of a%b is 3 and the value of b%a is 1 as the smallest of the two is 1 so the out putbe 1
Sample output
3
7
Sampleinput
1
print("Enter number 1: ")
num1 = int(input())
print("Enter number 2: ")
num2 = int(input())
print( min(num1%num2,num2%num1) )
Comments
Leave a comment