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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
Aisha has finished working on a word processing document that contains 15 pages. she has added some special elements in the first three pages, page 9 and 10, and page 15 from the document. she wants to print only these pages to see how they look. which option is the correct way to represent (in the print dialog box) the pages that aisha wants to print?
Answers: 1
question
Computers and Technology, 23.06.2019 00:30
If joey was single and his taxable income was $9,500, how much would he pay in taxes each year?
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
Which company provides a crowdsourcing platform for corporate research and development? a: mtruk b: wiki answers c: mediawiki d: innocentive
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
Plz ( which is an example of a good url?
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
question
Computers and Technology, 07.04.2020 01:18
question
Biology, 07.04.2020 01:18
question
Mathematics, 07.04.2020 01:18
question
Mathematics, 07.04.2020 01:19
Questions on the website: 13722366