program ct; uses crt; var s,i,n:integer; begin clrscr; write(‘nhap n:=’);readln(n); s:=0; for i:=1 to n do s:=s+i; writeln(‘tong la:’,s); readln end. Bình luận
uses crt; var i,n,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
program ct;
uses crt;
var s,i,n:integer;
begin
clrscr;
write(‘nhap n:=’);readln(n);
s:=0;
for i:=1 to n do s:=s+i;
writeln(‘tong la:’,s);
readln
end.
uses crt;
var i,n,s: integer;
begin
clrscr;
write (‘nhap n: ‘); readln (n);
for i:=1 to n do s:=s+i;
writeln (‘tong la: ‘,s);
readln;
end.