print "greatest common divisor\n"; print " input two numbers : "; x = read(); y = read(); if ( x < y ) { foo = x; x = y; y = foo; } while( y > 0 ) { q = x / y; z = x % y; print x," = ", q, " * ", y," + ", z, "\n"; x = y; y = z; } # the things we want are now one entry earlier print "gcd = ", x, "\n"; quit