Question: Write a program that will find the GCD (greatest common divisor) of two integers. It is the largest number that will evenly divide into both

Write a program that will find the GCD (greatest common divisor) of two integers. It is the largest number that will evenly divide into both integers. For example, the GCD of 12 and 16 is 4.

You should have at least one function that will calculate and return the GCD.

Sample Run #1: (the bold text is what the user types)

Numbers? 12 16

GCD = 4

Press any key to continue . . .

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!