Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.
program Tinh_S;
var i,n:integer;
S:real;
begin
writeln('Nhap so n=') ; readln(n);
i:=1 ; S:=0;
while i<=n do
begin
S:=S+1/n*(n+1); i:=i+1;
end;
writeln('Tong S=',S);
readln
end.
program TinhTongWhileDo;
var
n, i: integer;
S: real;
begin
write('Nhap so n: ');
readln(n);
S := 0;
i := 1;
while i <= 2*n do
begin
S := S + 1/i;
i := i + 1;
end;
writeln('Tong S=1/1+1/2+1/3+1/4+...+1/2n la: ', S:0:2);
readln;
end.
Program HOC24;
var i,n: integer;
s: real;
begin
write('Nhap N: '); readln(n);
s:=0;
for i:=1 to n do s:=s+1/(i*i*i);
write('S = ',s:6:2);
readln
end.
a: uses crt;
var i,n:integer;
s:real;
begin
clrscr;
s:=0;
for i:=1 to 100 do s:=s+1/i;
writeln(s:4:2);
readln;
end.
b:
uses crt;
var i,n:integer;
s:real;
begin
clrscr;
s:=0;
i:=0;
while i<=100 do
begin
inc(i);
s:=s+1/i;
end;
writeln(s:4:2);
readln;
end.
var i,n,s:integer;
begin
write('nhap n = ');readln(n);
i:=1;
while i<=n do
begin
s:=s+i;
i:=i+1;
end;
write('Tong la ',s);
readln;
end.
program tinhtong;
var n,i : integer;
S : real;
begin
write('Nhap n: ');
readln(n);
i:=1;
S:=0;
while i<=n do
begin
S:=S+1/i;
i:=i+1;
end;
writeln('Tong S= ',S);
readln;
end.
program tinh_tong_S;
var
n, i: integer;
S: real;
begin
write('Nhap n: ');
readln(n);
S := 0;
i := 1;
while i <= n do
begin
S := S + 1 / i;
i := i + 1;
end;
writeln('Tong S la: ', S:0:2);
readln;
end.
Program HOC24;
var i,n: integer;
s: real;
begin
write('Nhap N: '); readln(n);
s:=0; i:=1;
while i<=n do
begin
s:=s+1/(i*2);
i:=i+1;
end;
write('S= ',s:6:2);
readln
end.