program tong_A; uses crt; var n:integer; A:real; begin clrscr; write(‘Nhap n: ‘); readln(n); A:=0; for i:=1 to n do A:=A+1/i; write(‘A=’ ,A:2:2); readln; end. Bình luận
program Tong; uses crt; var n, i: integer; A: real; Begin clrscr; write(‘Nhap n: ‘); readln(n); for i:=1 to n do A:=A+1/i; write(‘A = ‘,A:2:2); readln End. Bình luận
program tong_A;
uses crt;
var n:integer;
A:real;
begin
clrscr;
write(‘Nhap n: ‘); readln(n);
A:=0;
for i:=1 to n do
A:=A+1/i;
write(‘A=’ ,A:2:2);
readln;
end.
program Tong;
uses crt;
var n, i: integer;
A: real;
Begin
clrscr;
write(‘Nhap n: ‘); readln(n);
for i:=1 to n do A:=A+1/i;
write(‘A = ‘,A:2:2);
readln
End.