Câu 1:
uses crt;
var n,s: integer;
a: array [1..100] of integer;
begin
clrscr;
write('Nhap n= '); readln(n);
for i:=1 to n do begin
write('nhap so thu ',i,' :'); readln(a[i]);
end;
for i:=1 to n do s:=s+i;
writeln('Tong la: ',s);
readln;
end.
Program tinhtong ;
Uses crt;
Var N,tong:interger:
A:array[1..n]of integer;
Begin
Writeln ('nhap N:'); Readln (N);
tong:=0;
Fortnite i:=1to n do tong:= tong +i;
Writeln ('tong la'),tong)
Readln
End.