[Tutor] Coin toss program

LONG, SPENCER SPENCER_LONG at fleet.com
Wed Oct 29 13:02:17 EST 2003


Hello,

I'm having difficulty writing code for the following end of chapter
exercise:

"Write a program that flips a coin 100 times and then tells you the number
of heads and tails."

Can anyone forward to this Newbie the code for how this is accomplished? So
far I have code that flips the coin once (using a random number generator),
which results in either a heads or tails.  But again, it's a single flip of
the coin.


Thanks,

Spencer

 



More information about the Tutor mailing list