HCF-
- stands for Highest common factor
Example -
HCF of 8 and 12 is 4
HCF of 13 and 17 is 1
HCF of 100 and 200 is 100
HCF of 15 and 50 is 5
Program -
print("Enter first number")
a=int(input())
print("Enter second number")
b=int(input())
m=min(a,b)
while(1):
if a%m==0 and b%m==0:
print("HCF is - "+str(m))
break
m=m-1
Enter first number
13
Enter second number
17
HCF is - 1
Enter first number
100
Enter second number
200
HCF is - 100
Enter first number
8
Enter second number
12
HCF is - 4
-In this program, we take mininum out of two number and decrease one by one and for each value we check that it divide the given inputs or not.