(Compute the greatest common divisor) Another solution for Listing to find the greatest common divisor (GCD) of two integers n1 and n2 is as follows: First find d to be the minimum of n1 and n2 , then check whether d , d-1 , d-2 ,... ,2 , or 1 is a divisor for both n1 and n2 in this order. The first such common divisor is the greatest common divisor forn1 and n2. Write a program that prompts the user to enter two positive integers and displays the GCD.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.