In this program I have given the concept of finding the hcf between two numbers using function.
The highest common factor of integers x and y is the largest integer that evenly divides both x and y.
The main points to be remember while doing this program is:
If y is equal to 0, then hcf(x,y) is x,
otherwise
hcf(x,y) is hcf(y,x%y)
The main source code of the program is given below:
0 comments :
Post a Comment