This code needs to have both a recursive and iterative function, with the iterative function having the loop. How does this need to be done?

Code://Program Purpose: computes the greatest common divisor (gcd) of two numbers given that // gcd is the product of the integers’ common factors. #include <stdio.h> #include <math.h> int main (void) { /*Define Variables*/ int x; int y; int remainder; int gcm; /*Get user Input*/ printf("Input first number-> "); scanf("%d", &x); printf("Input second number-> "); scanf("%d", &y); /* Compute */ x=abs(x); y=abs(y); do{ remainder=x%y; x=y; y=remainder; } while(remainder!=0); gcm=x; printf("gcm = %d \n", gcm); return 0; }