[CSC 204] Sample Output
Andrew Pounds
pounds_aj at mercer.edu
Thu Apr 9 22:03:10 EDT 2009
Okay -- here is sample output from one of my program runs. Try to make
your output look like this.
***** C R A Z Y G A M E O F C H A N C E *****
Sides on Die 1 : 4
Sides on Die 2 : 8
Sides on Die 3 : 10
Rolls Mean Median Mode Delta Mode Probability of Rolling Mode
----------- ------ ------- ------ ---------- ---------------------------
10 11.364 11 7 -1 27.27
100 12.139 12 11 11 11.88
1000 12.356 12 12 12 10.29
10000 12.492 13 13 12 9.89
100000 12.520 13 12 12 9.76
1000000 12.504 12 12 12 9.74
1000000000 12.500 13 12 12 9.70
Now -- pay special attention to the Delta Mode column. For small
numbers of rolls, it is quite possible that you never roll the same
number twice -- which means all the elements of the Delta array will be
zero. If this is the case, return a negative one.
Also, the probability of rolling the mode is listed as a percentage --
so calculate the probability and multiply by 100.
Some of you may have computers that aren't up to the challenge of
computing the "billion" rolls. Test with
smaller rolls, get your formatting right, and then send me the code
after you change the max rolls back to a billion.
Finally, the program is due tomorrow night. I will, however, accept the
extra credit late with a penalty of 25% taken off per day late. So the
maximum you can get on Saturday is 15 points, 10 points on Sunday, 5
points on Monday.
--
Andrew J. Pounds, Ph.D. (pounds at theochem.mercer.edu)
Associate Professor of Chemistry and Computer Science
Mercer University, Macon, GA 31207 (478) 301-5627
More information about the csc204
mailing list