home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / graphics-0.17 / graph / sin.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-11  |  319 b   |  17 lines

  1. #include "sys-defines.h"
  2.  
  3. int
  4. main (argc, argv)
  5.      int argc;
  6.      char **argv;
  7. {
  8.   extern double atof();
  9.   double x, theta, delta_x, x_max;
  10.   theta = atof(argv[1]);
  11.   delta_x = atof(argv[2]);
  12.   x_max = atof(argv[3]);
  13.   for (x = 0.; x < x_max; x += delta_x)
  14.     printf ("%g %g\n", x, sin (theta * x));
  15.   return (0);
  16. }
  17.