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 >
Wrap
Text File
|
1991-04-09
|
451b
|
27 lines
/* 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);
}