2 câu trả lời
uses crt;
var n:longint;
begin
clrscr;
readln(n);
write(1+2+3+n);
readln;
end.
Program viet_chuong_trinh_tong;
uses crt;
var n,i,s:integer;
Begin
Clrscr;
write('nhap so :');
readln(n);
S:=0; {tong ban dau = 0}
for i:=1 to n do S:=S+i; {cong don cho toi n}
Write('Tong cua 1+2+3+=',S);
readln;
End.