Question: Please do this as simple as possible and give explanations only at the beginner level this is for CS109. Code language is C++ 3) The
Please do this as simple as possible and give explanations only at the beginner level this is for CS109. Code language is C++ 3)
The ancient Greek mathematician Euclid developed a method for finding the greatest common divisor of two integers, A and B. His method is
If the remainder of A/B is 0, then B is the greatest common divisor
If it is not 0, then find the remainder of A/B and assign B to A and the remainder to B
Return to step a and repeat the process
Write a program that uses a function to perform the procedure. Main needs to call this function by sending inputs A and B (get user input for A and B first, in main), and display values of A, B and the greatest common divisor.
Run this program with A and B values in the range from (a) 10 to 100 and (b) in the range from 2000 to 5000
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
