Computer Science 2611
Summer 1999
Laboratory 6

Write a function that computes the greatest common divisor of two nonnegative integers. It should use recursion, and should not use a loop. It should not change the value of any variable. Use the following facts.
       gcd(0,x) = x
       gcd(x,y) = gcd(y mod x, x)    (for x > 0)

Write a main program that reads two numbers and prints their greatest common divisor, by calling the recursive gcd function. Test your program on several different kinds of inputs.

Turn in a printout of your program. Please be sure to label this and every program with your name and the laboratory number.