uses crt;var n,i,s: integer;beginclrscr;write (‘nhap n: ‘); readln (n);for i:=1 to n dos:=s+i;writeln (‘tong la: ‘,s);readln;end. Bình luận
uses crt; var n,i,s: integer; begin clrscr; write (‘nhap n: ‘); readln (n); for i:=1 to n do s:=s+i; writeln (‘tong la: ‘,s); readln; end. Bình luận
uses crt;
var n,i,s: integer;
begin
clrscr;
write (‘nhap n: ‘); readln (n);
for i:=1 to n do
s:=s+i;
writeln (‘tong la: ‘,s);
readln;
end.
uses crt;
var n,i,s: integer;
begin
clrscr;
write (‘nhap n: ‘); readln (n);
for i:=1 to n do
s:=s+i;
writeln (‘tong la: ‘,s);
readln;
end.