home *** CD-ROM | disk | FTP | other *** search
- /* Program EX_0206.C
- Listing 2C - see documentation in TUTOR.SSS
- */
-
- #include "SSSC.H"
-
- double rnx(float m, float s)
- {
- double x;
- do x = RN(m, s);
- while (x <= 0.0);
- return(x);
- }
-
- main()
- {
- float pt;
- pt = rnx(7, 4);
- do
- {
- printf("Start of call is at %7.2f", pt);
- if(RA()<.25)pt += ER(2, 2); else pt += TR(1, 3, 4);
- printf(" ends at %7.2f\n", pt);
- pt += rnx(7, 4);
- } while (pt <= 120);
- }
-