diff --git a/Mathematics/Greatest_common_divisor.py b/Mathematics/Greatest_common_divisor.py new file mode 100644 index 0000000..bf12d2f --- /dev/null +++ b/Mathematics/Greatest_common_divisor.py @@ -0,0 +1,45 @@ +""" +Question : find the greatest common factor for given two numbers. + +by: frosthead, github: github.com/frost-head + +example: + input: + a = 2, b = 4 + output: + 2 + explaination: + 2 is the highest number that divides both 2 and 4 completely. +""" +def GCD(): + a = int(input("enter the first number: ")) + b = int(input("enter the second number: ")) + gcd = 1 + if a