Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

hcf of numbers


def hcf(num1,num2):
    if num2==0:
        return num1
    else:
        return hcf(num2, num1%num2)

res = hcf(num1, num2)    
print('The highest common factor is', res)

Source by devarama.com #
 
PREVIOUS NEXT
Tagged: #hcf #numbers
ADD COMMENT
Topic
Name
4+4 =