subject

Write a program in c that simulates the rolling of two dice. the program should use rand to roll the first die, and should use rand again to roll the second die. the sum of the two values should then be calculated. note: since each die can show an integer value from 1 to 6, then the sum of the two values will vary from 2 to 12, with 7 being the most frequent sum and 2 and 12 the least frequent sum. the picture above shows 36 possible combinations of the two dice. your program should roll the two dice 36,000 times. use a single-subscripted array to tally the numbers of 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 apporimately 1/6 of the rolls should be 7.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 06:30, wwesuplexcity28
To become an audio technician, the most successful tactics might include the following. (select all that apply). learning how to persuade other people gaining different types of experience in audio technology learning as much as possible about art history establishing a reputation as a reliable professional
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, blake2001
Which of the following tasks is an audio technician most likely to perform while working on a nature documentary? (select all that apply). eliminating potentially distracting background noise adding sound effects making sure the lighting is adequate for a particular scene changing the narration to better match the mood of the documentary
Answers: 3
image
Computers and Technology, 23.06.2019 15:20, headshotplayzcod
In a game with three frames, where will the objects on layer 1 appear? a. next to the play area b. in the middle of the game c. behind everything else d. in front of everything else
Answers: 1
image
Computers and Technology, 24.06.2019 20:30, michell200428
Drums installed, you would apply clicks of the parking brake to obtain a slight drag on both rear wheels
Answers: 1
You know the right answer?
Write a program in c that simulates the rolling of two dice. the program should use rand to roll the...

Questions in other subjects:

Konu
Mathematics, 01.12.2020 08:30
Konu
Mathematics, 01.12.2020 08:30
Konu
Mathematics, 01.12.2020 08:30
Konu
History, 01.12.2020 08:30
Konu
History, 01.12.2020 08:30
Konu
Mathematics, 01.12.2020 08:30