/* Program 5-7

   Example of a 'while' loop */

main ()
 {
  int a, b, u, v, temp;

  printf ("Please type in two nonnegative integers.\n");
  scanf ("%d%d", &a, &b);

  u = a;
  v = b;

  while ( v != 0)
   {
    temp = u % v;
    u = v;
    v = temp;
   }

  printf ("The Greatest Common Divisor of %d and %d is %d\n", a, b, u);
 }

/* Program Output

Please type in two nonnegative integers.
150 35
The Greatest Common Divisor of 150 and 35 is 5

*/
