Question: Need help with this C++ program: Create a function called gcd that will take two parameters of a and b and return the greatest common
Need help with this C++ program:
Create a function called gcd that will take two parameters of a and b and return the greatest common denominator.
Have the main program input the numbers, check to make sure the first number is not zero and both numbers are not negative. If they are incorrect, print an error message. Otherwise call the gcd function and print the answe in c++.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
