home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d9xx
/
d958
/
fed-case.lha
/
Fed-CASE
/
sources
/
roulette.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-12-04
|
4KB
|
80 lines
/************************************************************************/
/* */
/* Code generated by FED-CASE V1.0 Code Generator */
/* © Joosen Software Development */
/* All rights reserved 1993 */
/* */
/************************************************************************/
/************************************************************************/
/* */
/* Start of Includes */
/* */
/************************************************************************/
#include <exec/types.h>
#include <data/const_roulette.h>
#include <stdio.h>
#include <stdlib.h>
/************************************************************************/
/* */
/* End of Includes */
/* */
/************************************************************************/
/************************************************************************/
/* */
/* Start of source prototype file */
/* */
/************************************************************************/
#include <proto/proto_roulette.h>
/************************************************************************/
/* */
/* End of source prototype file */
/* */
/************************************************************************/
/************************************************************************/
/* Procedure : void main() */
/* Function : */
/* Designer : C.Joosen & R.Heijmans */
/* Date : Sat Nov 27 13:54:45 1993 */
/* */
/* Modificat : */
/* Handler : */
/* Modific. : */
/* */
/************************************************************************/
void main()
{
int LI_inzet;
int LI_dag;
int LI_result;
int LI_gamble;
int LI_profit;
int LI_in;
LI_in= 50 ;
LI_profit= 0;
do
{
LI_in*= 2;
LI_gamble= 36 * rand() + 1; /* rand: */
LI_result= 37 * rand();
if (LI_gamble- LI_result== 0 )
{
LI_profit+= 36 * LI_in;
}
else /* if(LI_gamble-LI_result == 0) */
{
LI_profit-= LI_in;
} /* end of else 'if(LI_gamble-LI_result == 0)' */
} while( LI_profit< 0);
printf( "maximum in today %d : %4d\n" , LI_dag , LI_inzet ); /* printf: Standard output function */
} /* end of V_main */