uses crt;
var s,i,a:longint;
begin
clrscr;
s:=0;i:=2;
write('nhap so thu 1:');readln(a);
while a<>0 do
begin
s:=s+1/a;
writeln('nhap so thu',i);readln(a);
i:=i+1;
end;
writeln('tong nghich dao la:',s:2:3);
readln;
end.
program bai1;
var a:array[1..100] of longint;
s,i,n:longint;
begin
repeat
write('N= ');readln(n);
until n>0;
for i:=1 to n do
begin
write('A[',i,']= ');readln(a[i]);
if a[1] =0 then exit;
end;
s:=0;
for i:=1 to n do
begin
if a[i]>0 then s:=s+1/a[i];
end;
writeln('Tong la ',s);
readln
end.