Question: Write a C++ program that rolls two dice, uses an array to record the frequency of the values of the addition of the two dice,

 Write a C++ program that rolls two dice, uses an array

Write a C++ program that rolls two dice, uses an array to record the frequency of the values of the addition of the two dice, so it will record how many 2's, 3's, 4's., 12's was the result of throwing the dice n times. The user will input n. The program will output a table showing the number of times and percentage of each sum. What is the most likely outcome when throwing two die? Write the following functions: .int RollDie() Returns the value of rolling the die once void PrintTable(unsigned int[], unsigned int) Prints a very nice table with the results from 2 to 12 void InitializeArray(unsigned int[]. unsigned int, unsigned int-e) Initializes the array with the values of the third parameter void writeArray(unsigned int[], unsigned int, ostream&) Writes the array into output file given in the third parameter . unsi uns Gets the value of summation that repeated the most

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!