home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Distributions / ucb / spencer_2bsd.tar.gz / 2bsd.tar / src / pascal / tests / t17.p < prev    next >
Text File  |  1980-02-17  |  241b  |  21 lines

  1. program graph1(output);
  2. const
  3.     d = 0.0625;
  4.     s = 32;
  5.     h = 34;
  6.     c = 6.28318;
  7.     lim = 32;
  8. var
  9.     x,y: real;
  10.     i,n: integer;
  11.  
  12. begin
  13.     for i := 0 to lim do
  14.     begin
  15.         x := d*i;
  16.         y := exp(-x)*sin(c*x);
  17.         n := round(s*y) + h;
  18.         writeln('*':n);
  19.     end
  20. end.
  21.