home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / spezial / 02 / t6.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1986-02-05  |  209 b   |  12 lines

  1. program egrepeat;
  2. var n:integer; h:real;
  3. begin
  4.   writeln('compute h(n):= 1 + 1/2 + 1/3 + ... + 1/n');
  5.   write  ('n:='); read(n); h:=0;
  6.   repeat
  7.     h:=h+1/n; n:=n-1;
  8.   until n=0;
  9.   writeln(h)
  10. end.
  11.  
  12.