program tinhtong;
uses crt;
var i, n, s: integer;
begin
clrscr;
Write('N so tu nhien dau tien la: '); readln(n);
s:=0; i:=1;
while i<=n do begin
s:=s+i; i:=i+1;
end;
writeln('Tong cac so la: ',s);
readln
end.
uses crt;
var i,s,n: integer;
begin
clrscr;
write('Nhap vao so n = ');readln(n);
i:=1;
s:=0;
while i<=n do
begin
s:=s+i;
inc(i);
end;
writeln('Tong cua ',n,' so tu nhien dau tien la ',S);
readln;
end.