annotate lab2/gcd.p @ 0:bfdcc3820b32

Basis
author Mike Spivey <mike@cs.ox.ac.uk>
date Thu, 05 Oct 2017 08:04:15 +0100
parents
children
rev   line source
mike@0 1 (* lab2/gcd.p *)
mike@0 2
mike@0 3 var x, y: integer;
mike@0 4
mike@0 5 begin
mike@0 6 x := 3 * 37; y := 5 * 37;
mike@0 7 while x <> y do
mike@0 8 if x > y then
mike@0 9 x := x - y
mike@0 10 else
mike@0 11 y := y - x
mike@0 12 end
mike@0 13 end;
mike@0 14 print x; newline
mike@0 15 end.
mike@0 16
mike@0 17 (*<<
mike@0 18 37
mike@0 19 >>*)