home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turbo Toolbox
/
Turbo_Toolbox.iso
/
spezial
/
02
/
t6.pas
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
Pascal/Delphi Source File
|
1986-02-05
|
209 b
|
12 lines
program egrepeat;
var n:integer; h:real;
begin
writeln('compute h(n):= 1 + 1/2 + 1/3 + ... + 1/n');
write ('n:='); read(n); h:=0;
repeat
h:=h+1/n; n:=n-1;
until n=0;
writeln(h)
end.