Napíšte program na Euklidov algoritmus.
program euklidov_algoritmus;
uses crt;
var x,y:integer;
begin
clrscr;
textcolor(3);
writeln('zadaj prve cislo');
readln(x);
writeln('zadaj druhe cislo');
readln(y);
repeat
if x>y then x:=x-y;
if y>x then y:=y-x;
until x=y;
writeln('najvacsi spolocny delitel je ',x);
readln;
end.