Cod sursa(job #147049)
Utilizator | Data | 2 martie 2008 15:36:46 | |
---|---|---|---|
Problema | Algoritmul lui Euclid | Scor | 0 |
Compilator | fpc | Status | done |
Runda | Arhiva educationala | Marime | 0.26 kb |
var a,b,t:longint;
f:text;
begin
assign(f,'euclid2.in');
reset(f);
read(f,a,b);
close(f);
while b>0 do
begin
t:=a mod b;
a:=b;
b:=t;
end;
assign(f,'euclid2.out');
rewrite(f);
write(f,a);
close(f);
end.