[CoLoCo] dice rolls in C
Jim Hutchinson
jim at ubuntu-rocks.org
Tue Feb 5 21:11:44 GMT 2008
On Feb 5, 2008 1:47 PM, Dale K. Hawkins <dkhawk at gmail.com> wrote:
> const long unsigned int tenmillion = 10000000000L;
>
> If you do this, you will also have to change these declarations:
>
> int i; => unsigned long int i;
> int totals; => unsigned long int totals;
>
> and the printf statement to
>
> printf("%d %ul\n");
>
Cool, that did it. Thanks. I'm currently simulating 1 trillion rolls.
Wonder how long it will take. However, I'm disappointed that these
random numbers seem quite random in that I don't "see" any anomalies.
I was hoping for some as it would make for a more interesting
experiment.
-jim
--
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
More information about the Ubuntu-us-co
mailing list