diff --git a/t01primeshcflcm_hcf1.py b/t01primeshcflcm_hcf1.py index 7ea02a8..2dc9e37 100644 --- a/t01primeshcflcm_hcf1.py +++ b/t01primeshcflcm_hcf1.py @@ -1,2 +1,8 @@ # Find the Highest Common Factor (HCF) of 18 and 30. +a = 18 +b = 30 + +while b != 0: + (a, b) = (b, a % b) +print(a)