Simulate tossing a coin 10000 times and record how many


1 Simulate rolling a pair of dice 10,000 times, and record the number of 2's, 3's etc. using an array. The array size would be 0 to 12, but you would not use indexes 0 or 1 because your numbers would be 2 to 12. Print out the number of 2's, 3's, etc. May sure your program gives random values each time the program is run. Print out 2 runs of the program. Your for loops would go from 2 to 12.

2 Simulate tossing a coin 10,000 times and record how many tails and heads you get. Make two runs as with the dice. Again accumulate the number of heads and tails in an array. Your for loops would go from 0 to 1.

 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Simulate tossing a coin 10000 times and record how many
Reference No:- TGS0644889

Expected delivery within 24 Hours