var t,n,i:integer;
begin
write('nhap n=');readln(n);
t:=0;
for i:=1 to n do t:=t+i;
writeln('tong la:',t);
readln
end.
Uses crt;
var n,i,s:integer;
begin
clrscr;
write('nhap n=');
readln(n);
s:=0;
for i:=1 to n do s:=s+i;
write('tong vua tinh la:',s:3);
readln;
end.