Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribed

\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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MFDBS 89 2nd Symposium On Mathematical Fundamentals Of Database Systems Visegrad Hungary June 26 30 1989 Proceedings

Authors: Janos Demetrovics ,Bernhard Thalheim

1989th Edition

3540512519, 978-3540512516

More Books

Students also viewed these Databases questions

Question

1. List the steps in the recruitment and selection process.

Answered: 1 week ago