Write
a Visual Studio C# Console application to simulate the rolling of two dice. Use
an object of the Random class for each die. You should calculate the sum of the
two values on the face of the dice after each roll of the two dice. This value
will range from 2 to 7.
Your
application should roll the dice 36,000 times. Use an array to tally the total
number of times each possible sum appears. Display the result in a tabular form
with the first column showing the sum and the second column showing the number of
times it appeared and the third column showing the percentage of time the sum
appeared.
Include
a "Console.ReadKey()" instruction as the last line of your code.
No comments:
Post a Comment