
March 15th, 2004, 06:43 PM
|
|
Registered User
|
|
Join Date: Mar 2004
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Can someone help me with this C++ Program
I am a student and i am learning C++. Can someone help me do this program. I have no idea really where to start.
The instuctions are:
Write a program that simulates the rolling of two dice. The program should use rand to roll the first dice and should use rand
again to roll the second dice. The sum of the two values should then be calculated. [note: each dice can show an integer value from 1-6, so the sum of the two values will vary from 2-12, with 7 being the most frequent sum and 2 and 12 being the least frequent sums] Your program should roll the dice 36,000 times. use a single array to tally the numbers of times each possible sum appears. Print the results in a tabular format. Also, determine if the totals are reasonable (i.e. there are six ways to roll a 7, so approximately one sixth of the rolls should be 7).
|