Cod sursa(job #1823864)
Utilizator | Data | 6 decembrie 2016 22:24:18 | |
---|---|---|---|
Problema | Algoritmul lui Euclid | Scor | 0 |
Compilator | fpc | Status | done |
Runda | Arhiva educationala | Marime | 0.22 kb |
Program euclid;
Var
f1,f2:text;
a,b,r,i:longint;
Begin
Assign (f1,'euclid2.in');
Reset (f1);
Assign (f2,'euclid2.out');
Rewrite(f2);
read (f1,a,b);
r:=a mod b;
While r<>0 do
Begin
a:=b;
b:=r;
r:=a mod b;
end;
end.