| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
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). |
|
#2
|
|||
|
|||
|
Quote:
|
|
#3
|
||||
|
||||
|
A little impatient here?
Posting your own text 2 times in 2 minutes is not gonna help you... Be patient and just wait until someone takes the time to help you with your problem. Read the forum rules before posting.
__________________
Work to live, don't live to work |
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > Can someone help me with this C++ Program |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|