VCT tính tổng 11+22+33+44+55+66+…+(11n) 25/07/2021 Bởi Josephine VCT tính tổng 11+22+33+44+55+66+…+(11n)
uses crt; var s,i,n: longint; begin clrscr; write (‘nhap n: ‘); readln (n); for i:=1 to n do s:=s+(i*11); writeln (‘tong la: ‘,s); readln; end. Bình luận
program btsydn; uses crt; var n, s, i: integer; begin clrscr; write(‘Nhap n = ‘); readln(n); s:=0; for i:=1 to n do s:=s+i*11; write(‘Tong = ‘, s); readln end. Bình luận
uses crt;
var s,i,n: longint;
begin
clrscr;
write (‘nhap n: ‘); readln (n);
for i:=1 to n do s:=s+(i*11);
writeln (‘tong la: ‘,s);
readln;
end.
program btsydn;
uses crt;
var n, s, i: integer;
begin
clrscr;
write(‘Nhap n = ‘); readln(n);
s:=0;
for i:=1 to n do s:=s+i*11;
write(‘Tong = ‘, s);
readln
end.