Cod sursa(job #363956)
Utilizator | Data | 15 noiembrie 2009 09:37:21 | |
---|---|---|---|
Problema | A+B | Scor | 0 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.23 kb |
var a,b,r:integer;
begin
assign (input,'CMMDC.');
reset(input);
assign(output ,'CMMDC.out');
rewrite(output);
read(a,b);
r:= a mod b;
while r<>0 do
a:=b;
b:=r;
r:=a mod b;
write(b);
close(input);
close(output);
end.