Greatest Common Divisor Flowchart
Greatest Common Divisor Flowchart
GCD(Greatest Common Divisor) of the two numbers is the largest number that can exactly divide both numbers. We can also call this HCF( Highest Common Factor).
Example
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.
Flowchart
The GCD recursive function is as follows:
Output
—
Flowgorithm Tutorials
Flowgorithm flowchart tutorials on this website:
https://www.testingdocs.com/flowgorithm-flowchart-tutorial/
For more updates please like our Facebook page: