Question: I need it solved in C++, code blocks please. The greatest common divisor (GCD) of two or more integers (at least one of which is
I need it solved in C++, code blocks please.
The greatest common divisor (GCD) of two or more integers (at least one of which is not zero) is the largest positive integer that divides the numbers without a remainder. Write a function int getGCD (int val1, int val2) which calculate the GCD of the two number given as parameter. For example, the GCD of 8 and 12 is 4. For example: Test printf("%d", getGCD ( 8,12)); 4 Output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
