GCD of Two Numbers in Python || Python

 

In this we are going to see a program on how to calculate GCD of Two Numbers in Python Programming Language.


def hcf(a, b):
    if a == 0:
        return b
    return hcf(b % a, a)

print(hcf(100, 150))

# Coded By DHIRAJ SHELKE

#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post