print ("Enter first number")
x = int(input())
print ("Enter second number")
y = int(input())
while y != 0:
x, y = y, x % y
print(x)
i have seen this particular program while practicing, this program works perfectly fine but i dont understand how is it working. Can anyone explain as to how this program works for finding greatest common divisor (GCD) or highest common factor (HCF) of given two numbers.