Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started