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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!