CS1500 Algorithms and Data Structures for Engineering, FALL 2012

 LAB 2: Euclid's GCD algorithm

Write a program that takes two positive (non-zero) integers as inputs and computes their GCD (greatest common divisor) using Euclid’s algorithm. A description of the algorithm can be found here. For this lab, you have to use a loop (while or do-while), not a recursive function.