var i,n,s:integer;begin write('n = '); readln(n); for i:=1 to n do if i mod 2 = 0 then dec(s,i) else inc(s,i); write('S = ',s)end.
var n,i,rez:integer;beginwrite('Введите n: ');readln(n);rez:=0;for i:=1 to n doif odd(i) then rez:=rez+ielse rez:=rez-i;writeln('rez=',rez);end.
var i,n,s:integer;
begin
write('n = ');
readln(n);
for i:=1 to n do
if i mod 2 = 0 then dec(s,i) else inc(s,i);
write('S = ',s)
end.
var n,i,rez:integer;
begin
write('Введите n: ');
readln(n);
rez:=0;
for i:=1 to n do
if odd(i) then rez:=rez+i
else rez:=rez-i;
writeln('rez=',rez);
end.