home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 349_01 / sss.arc / EX_0206.C < prev    next >
Text File  |  1991-04-09  |  451b  |  27 lines

  1. /* Program EX_0206.C
  2.    Listing 2C - see documentation in TUTOR.SSS
  3. */
  4.  
  5. #include "SSSC.H"
  6.  
  7. double rnx(float m, float s)
  8. {
  9.   double x;
  10.   do x = RN(m, s);
  11.   while (x <= 0.0);
  12.   return(x);
  13. }
  14.  
  15. main()
  16. {
  17.   float pt;
  18.   pt = rnx(7, 4);
  19.   do
  20.   {
  21.     printf("Start of call is at %7.2f", pt);
  22.     if(RA()<.25)pt += ER(2, 2); else pt += TR(1, 3, 4);
  23.     printf(" ends at %7.2f\n", pt);
  24.     pt += rnx(7, 4);
  25.   } while (pt <= 120);
  26. }
  27.