program tong;
use crt;
var i,n:integer;
s:real
Begin
write(' nhap n'); readln(n);
s:=0;
for i:= 1 to n do
s:=s+\(\dfrac{1}{i}\)
write(' tong la',s);
readln;
End.
program Tinh_Tong;
uses crt;
var a,S,n: Real;
begin clrscr;
writeln('Nhap so n=');Readln(n);
S:=0;
For a:= 1 to n do S:=S+1/a;
writeln('Tong la S=',S);
readln
end.
Program tinh_tong;
Uses Crt;
Var i,n:integer;
s:real;
Begin
Write('Nhap so n: ');readln(n);
s:=0
For i:=1 to n do s:=s+\(\dfrac{1}{i}\);
Write('Tong la: ',s);
Readln;
End
Program bai1;
uses crt;
var i,n: integer;
S: real;
begin
clrscr;
write('nhap n ='); readln(n);
S:=0;
for i:= 1 to n do
S:=S+1/i;
writeln('tong = ' ,S:4:2);
readln;
end.