Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use C programming only (40 Points) Dice Rolling) Write a C program that simulates the rolling of two dices. The program should use rand function

Use C programming only image text in transcribed
(40 Points) Dice Rolling) Write a C program that simulates the rolling of two dices. The program should use rand function twice to roll the first die and then the second. The sum of the two rolled dice values should be calculated for this dual rolled dices. Program#2 to be Created in-class: (FYI Notes: Your program should dual-roll dices for 36,000 times to get 36 possible combination of the two rolled dices. Also, Because each roll can show integer value from 1 to 6, then the sum of the two dices will vary from 2 to 12). In your program, since we are interested in the SUM value ONLY that varies from 2 to 12, use one dimensional array to count how many times each possible value of SUM for each dual-roll of 36000 dual-rolls (SUM takes value as either 2 or 3 o 4 or 5 or 6 or 7 or 8 or 9 or 10 or 11 or 12). It is known that the maximum frequency count of the SUM being 7 is 6000 (one-sixth of 36000). Also, it is known that the other frequency counts of the SUM is less than 6000. Print the frequency counts of the sUM result for dual roll in a tabular format shown below: OUTPUT: Print Header to table: Frequency Count Table for dual-roll dices sum is shown below Dual-Roll dices Sum (4 spaces) Frequency (Hint: #### should be close to 1000,) (Hint: #### should be close to 2000,) (Hint: #### should be close to '3000') (Hint: #### should be close to '4000,) (Hint: #### should be close to .5000,) (Hint: #### should be close to '6000,) (Hint: #### should be close to' 5000,) (Hint: #### should be close to 4000 (Hint: #### should be close to' 3000') (Hint: #### should be close to .2000 (Hint: #### should be close to 1000') ## 4 10 12 Post BOTH Cprogram and its RUN Output as a word doe on Canvas under lid-Exam#1-Program #2 At Top of Word Student# Doc, The word document must contain your name and given

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

More Books

Students also viewed these Databases questions