Câu 1:
var i,n:integer;
s:longint;
begin
write('Nhap n = ');readln(n);
for i:=1 to n do
s:=s+(i*10+2);
write('S = ',s);
readln;
end.
Câu 2:
var i,n:integer;
s:real;
begin
write('Nhap n = ');readln(n);
for i:=1 to n do s:=s+1/n;
write('tong la ',s:10:2);
readln;
end.