Question: use c to Write a function that calculates the greatest common divisor ( GCD ) of two positive integers. The three function parameters are the

use c to Write a function that calculates the greatest common divisor (GCD) of two positive integers. The
three function parameters are the two positive integers and a pointer indicating the location to which the result
should the written. The function should return 0 in case of successful execution or return -1 in case of
malformed/bad input.
int gcd_calculator(int a, int b, int ?**gcd); //function prototype

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!