0

What's wrong with my code??

def gcd(m,n): m=int(input()) n=int(imput()) i=min(m,n) while i>0: if ((m%i)==0 and (n%i)==0): return(i) else: i=i-1 print(gcd(m,n))

6th Jan 2022, 3:53 AM
Manish Kumar Y
1 Answer
+ 1
It's not necessary to create a question again, and your priority is to understand the basic syntax. spell, indent, function logic, error prompt from IDE def gcd(m, n): i = min(m, n) while i > 0: if ((m % i) == 0 and (n % i) == 0): return(i) else: i = i - 1 a = int(input()) b = int(input()) print(gcd(a, b))
6th Jan 2022, 4:19 AM
FanYu
FanYu - avatar