progarm Tinh_Tong;
uses crt;
var n,i:integer;
S:real;
begin;
clrscr;
writeln('nhap n = ');
readln(n);
s:=0;
for i :=1 to n do S :=S + 1/i;
writeln('tong S = ',S:5:2);
readln
end.
program bai1;
var t,i,n:longint;
begin
{repeat
write('N= ');
readln(n);
unntil n>0}sử dụng repeat until cũng đc
t:=1;i:=2;
while i<=n do
begin
t:=t+1/i;
i:=i+1;
end;
write('T= ',t);
readln
end.