text: how can i write a c programme that calls a function euclid's algorithm? the greatest common divisor (gcd) of two positive integers is the largest integer which can be divided evenly into both integers. problem 1: given two integers a and b (assume that a > b) write a c program that calls a function called primitivegcd( a,b) to calculate the gcd of two positive integers. this function uses a simple algorithm based on successive test of all numbers less than or equal to b, in order to find the greatest common divisor. the pseudo-algorithm for implementing the function is as follows: 1. require that a ≥ 0 and b ≥ 0 2. if a  b), then the greatest common divisor of a and b is also the common divisor of a%b and b. int primitivegcd(int a, int b){   int g;   if (a < 0 || b < 0 ) return -1; /*error*/   g = b;   if (a < b){b = a; a = g; g = b;}   /* if g is not a factor of either it will return true value and it will continue looping */   while(a%g || b%g)g--;    return g; }  you can at least write the program. cheating doesn't help you learn.