program tong_F; uses crt; var n,i:integer; F:real; begin clrscr; write(‘Nhap n: ‘); readln(n); F:=0; for i:=1 to n do F:=F+1/i; write(‘F= ‘,f:2:2); readln; end. Bình luận
uses crt; var f: real; i,n: longint; begin clrscr; write (‘nhap n: ‘); readln (n); for i:=1 to n do f:=f+(1/i); writeln (‘tong la: ‘,f:1:2); readln; end. Bình luận
program tong_F;
uses crt;
var n,i:integer;
F:real;
begin
clrscr;
write(‘Nhap n: ‘); readln(n);
F:=0;
for i:=1 to n do
F:=F+1/i;
write(‘F= ‘,f:2:2);
readln;
end.
uses crt;
var f: real;
i,n: longint;
begin
clrscr;
write (‘nhap n: ‘); readln (n);
for i:=1 to n do f:=f+(1/i);
writeln (‘tong la: ‘,f:1:2);
readln;
end.