Group: alt.magick · Group Profile · Search for Coin2 in alt.magick
Author: boson boss
Date: Sep 18, 2006 15:53
...input variables are how many coins do the players have? int coin1=75, coin2=20; // the second input variable is how many times do we want to...(iteration>0){ coin1--; // alternatively they could bet more, like coin1=coin1-3; coin2--; if (coin1==0 || coin2==0) break; iteration--; if (random(2)==1) coin1++; else coin2++; printf("%%d %%d\n", coin1, coin2); } }
|