uses crt;
var t,i,n:integer;
begin
clrscr;
write('nhap n='); readln(n);
if (n>1) and (n<100) then
begin
t:=0;
for i:=1 to n do
if i mod 2=1 then t:=t+i
else t:=t-i;
writeln('tong la: ',t);
end
else writeln('vui long nhap lai');
readln;
end.
1 < N < 100 hả bạn?