home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / plotting / contour / contour.lha / Contour / rand.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-08-28  |  194 b   |  12 lines

  1. #include <math.h>
  2.  
  3. main()
  4. {
  5.    int i,m,n,npts=50;
  6.    for (i=0; i<20; i++) {
  7.       m = rand() % 10;
  8.       n = 10 + (int)((0.1*m+0.05)*(npts-20));
  9.       printf("i=%d  m=%d  n=%d\n",i,m,n);
  10.    }
  11. }
  12.