Date: Thursday, March 18, 2004.
Ex. 1 Write a program that enters two integer numbers and computes the greatest common divisor (GCD) of these two numbers. For example, GCD(42, 70) = 14. Use the top-down approach presented in class.
Ex. 2 Make the previous program ask the user in the end if they want to compute the GCD for two other numbers, and input his answer in a variable of type character. If the answer is equal to 'y' or 'Y', run the program again. The program should run until the user enters a character that is neither 'y' nor 'Y'. Use a do loop for this exercise.
Send me: Source code file containing an example of program execution.