Find GCD using python with two numbers only.
def gcd():
print(“Enter two numbers. This algorithm will find the greatestcommon denominator.”)
a = int(input(“Enter input A: “))
b = int(input(“Enter input B: “))
while not b == 0:
if(b == 0):
return a
else:
c = a % b
return c, b
print(“GCD is”, c)
gcd()
I need an explanation on why there is no output based onmy code and what is the correct approach.
Expert Answer
An answer will be send to you shortly. . . . .