Question: C++ 1. Write a function that reads in 10 grades and determines how many are above or equal to the average and how many are
C++
1. Write a function that reads in 10 grades and determines how many are above or equal to the average and how many are below. Read in the grades in main(), call the function to do the calculation, and print out the entire array so you can verify the result.
2. Write a program that simulated the rolling of two dice. Use a 6 by 6 two dimensional array to record how many times each combination occurs. Use columns to represent the first die and rows to represent the second.
For example:
Die 1
1 2 3 4 5 6
1 0 0 0 0 0 0
D 2 0 0 0 0 0 0
i 3 0 0 0 0 0 0
e 4 0 0 1 0 0 0
5 0 0 0 0 0 0
2 6 0 0 0 0 0 0
In the example above, this would represent a roll of 3 on die 1 and 4 on die 2. Write your program so that it rolls the dice 360,000 times, each time accumulating how many times each combination arises. At the end of the program, print out the matrix.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
