Answered step by step
Verified Expert Solution
Question
1 Approved Answer
need help with C++ The Greatest Common Divisor (gcd) of two or more integers, when at least one of them is not zero, is the
need help with C++
The Greatest Common Divisor (gcd) of two or more integers, when at least one of them is not zero, is the largest positive integer that divides the numbers without a remainder. for instance, the GCD of 8 and 12 is 4. Write a function named computeGCD that takes two positive integer arguments and returns the greatest common divisor of those two integers. If the function is passed an argument that is not greater than zero, then the function should return the value -1 to indicate than an error occurred
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started