home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 19
/
CD_ASCQ_19_010295.iso
/
dos
/
prg
/
pas
/
swag
/
math.swg
/
0006_GCD.PAS.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-05-28
|
277b
|
25 lines
{Greatest common divisor}
Program GCD;
Var
x, y : Integer;
begin
read(x);
While x <> 0 do
begin
read(y);
While x <> y do
if x > y then
x := x - y
else
y := y - x;
Write(x);
read(x);
end;
end.