1)
program gt;
var n,s:integer;
procedure summa(n:integer;var s:integer);
begin
s:=((n+1)*n)div 2;
writeln(s);
end;
begin
read(n);
summa(n,s);
end.
1.2)
program gt2;
var n,s:integer;
function summa(n:integer):integer;
var s:integer;
begin
s:=((n+1)*n)div 2;
summa:=s;
end;
begin
read(n);
s:=summa(n);
writeln(s);
end.
2)program gt;
label 3,9;
var m,n,q,r,a,b:longint;
begin
read(m,n);
a:=m;b:=n;
3:
q:=m div n;
r:=m mod n;
if (r=0)then goto 9;
m:=n;
n:=r;
goto 3;
9:
m:=(a*b)div n;
writeln('НОД=',n);
writeln('NOK=',m);
end.