Question: Create a C program to simulate rolling two dice 100 times. In an array, record the random totals from each roll of the two dice.

Create a C program to simulate rolling two dice 100 times. In an array, record the random totals from each roll of the two dice. Using a second array print out the number of times each possible total was rolled. Sample output is the following:

Create a C program to simulate rolling two dice 100 times. In

\begin{tabular}{rrrrrrrrrr} 9 & 7 & 9 & 5 & 4 & 8 & 9 & 4 & 7 & 6 \\ 4 & 5 & 5 & 11 & 8 & 9 & 5 & 10 & 5 & 9 \\ 4 & 8 & 4 & 6 & 12 & 5 & 7 & 9 & 5 & 7 \\ 6 & 6 & 9 & 9 & 5 & 8 & 6 & 5 & 7 & 6 \\ 4 & 5 & 12 & 4 & 8 & 6 & 7 & 7 & 6 & 8 \\ 10 & 3 & 3 & 11 & 4 & 4 & 7 & 6 & 6 & 6 \\ 10 & 7 & 5 & 9 & 9 & 9 & 10 & 8 & 11 & 6 \\ 3 & 5 & 3 & 8 & 5 & 7 & 7 & 4 & 8 & 9 \\ 3 & 8 & 9 & 6 & 6 & 11 & 8 & 10 & 12 & 5 \\ 6 & 2 & 6 & 5 & 8 & 6 & 7 & 7 & 5 & 11 \\ Total & Frequency & & & & & & & \\ \hline 2 & & 1 & & & & & & & \\ 3 & & 5 & & & & & & & \\ 4 & & 10 & & & & & & & \\ 5 & & 16 & & & & & & & \\ 6 & & 17 & & & & & & & \\ 7 & & 13 & & & & & & & \\ 8 & & 12 & & & & & & & \\ 9 & & 13 & & & & & & & \\ 10 & & 5 & & & & & & & \\ 11 & & 5 & & & & & & & \\ 12 & & 3 & & & & & & & \end{tabular}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!