GCD(Greatest Common Divisor) of the two numbers is the largest number that can exactly divide both the numbers. We can also call this HCF( Highest Common Factor).
Let’s look at an example. Take two numbers 12 and 20.
The factors of the number 12 are as follows:
1, 2, 3, 4, 6, 12
The factors of the number 20 are as follows:
1, 2, 4, 5, 10, 20
The common factors are 1,2,4
The greatest common factor is 4.
The GCD recursive function is as follows:
Flowgorithm flowchart tutorials on this website:
For more information on the Flowgorithm tool, please visit the official website at: