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_0305.C
< prev
next >
Wrap
Text File
|
1991-04-09
|
532b
|
36 lines
/* Program EX_0305.C
Listing 5C - see documnetation in TUTOR.SSS
*/
#include "SSSC.H"
int i, c;
void prime(void)
{
INIQUE(0, 0, 2);
INISTA(1, "Out of stock", 0, 0, 0.0, 0.0);
INISTA(2, "Ave stock", 1, 0, 0.0, 0.0);
}
main()
{
prime();
for (i=1; i<=3; i++)
{
c = 15;
SETT(30*(i-1));
TALLY(2, c);
SETT(T() + EX(2));
while (T() <= 30*i)
{
if (c > 0) c--; else TALLY(1, 1);
TALLY(2, c);
SETT(T() + EX(2));
}
}
SUMRY("");
}