comparison lab3/gcd.p @ 0:bfdcc3820b32

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