giải tin học 8 bài tập tính giá trị biểu thức Sn: Sn=1/3+2/5-3/7+–…+n/2n+1 23/07/2021 Bởi Nevaeh giải tin học 8 bài tập tính giá trị biểu thức Sn: Sn=1/3+2/5-3/7+………..+n/2n+1
program tinhtong; uses crt; var Sn:real; n,i:integer; begin clrscr; write(‘Nhap n: ‘); readln(n); Sn:=0; for i:=1 to n do Sn:=Sn+i/(2*n+1); write(‘Sn= ‘,Sn:2:2); readln end. Bình luận
uses crt; var n,i:integer; s:real; BEGIN clrscr; write(‘Nhap n:’); readln(n); s:=0; for i:=1 to n do s:=s+1/(i*2+1); write(s:0:3); readln END. Chúc bạn học tốt! Bình luận
program tinhtong;
uses crt;
var Sn:real;
n,i:integer;
begin
clrscr;
write(‘Nhap n: ‘); readln(n);
Sn:=0;
for i:=1 to n do
Sn:=Sn+i/(2*n+1);
write(‘Sn= ‘,Sn:2:2);
readln
end.
uses crt;
var n,i:integer;
s:real;
BEGIN
clrscr;
write(‘Nhap n:’); readln(n);
s:=0;
for i:=1 to n do
s:=s+1/(i*2+1);
write(s:0:3);
readln
END.
Chúc bạn học tốt!