In the following example, we will find the GCD of any two given numbers.
num1 =int(input("Enter (int) num1 = "))
num2 =int(input("Enter (int) num1 = "))
min = (num1 < num2) and num1 or num2;
for i inrange(1, min+1):
if((num1 % i ==0) and (num2 % i ==0)):
gcd = i
print("\nGCD of %d and %d: %d"% (num1, num2, gcd))