program prim; uses crt; var x,y:integer; begin writeln ('введите x,y'); readln (x,y); while x<>y do begin if x>y then x:=x-y else y:=y-x end; write ('НОД=',x); end.
var a,c,b:integer;beginreadln(a,b);while b>0 do begin a:=a mod b; c:=a;a:=b;b:=c; end;writeln(a);end.
program prim; uses crt; var x,y:integer; begin writeln ('введите x,y'); readln (x,y); while x<>y do begin if x>y then x:=x-y else y:=y-x end; write ('НОД=',x); end.
var a,c,b:integer;
begin
readln(a,b);
while b>0 do begin
a:=a mod b;
c:=a;a:=b;b:=c;
end;
writeln(a);
end.