Program z1; var a,b,c,d:integer; procedure nod(x,y:integer;var nod2:integer); begin while x<>y do begin if x>y then begin x:=x-y end else begin y:=y-x end end; nod2:=xend; begin write('a=');readln(a); write('b=');readln(b); write('c=');readln(c); write('d=');readln(d); nod(a,b,b); nod(b,c,c); nod(c,d,d); writeln('nod=',d); readln end.
var a,b,c,d:integer;
procedure nod(x,y:integer;var nod2:integer);
begin
while x<>y do begin
if x>y then begin
x:=x-y
end
else begin
y:=y-x
end
end;
nod2:=xend;
begin
write('a=');readln(a);
write('b=');readln(b);
write('c=');readln(c);
write('d=');readln(d);
nod(a,b,b);
nod(b,c,c);
nod(c,d,d);
writeln('nod=',d);
readln
end.