Write a program that simulates the rolling of two dice

Assignment Help Basic Computer Science
Reference no: EM131374893

(Dice Rolling) Write a program that simulates the rolling of two dice. The sum of the two values should then be calculated. [Note: Each die can show an integer value from 1 to 6, so the sum of the two values will vary from 2 to 12, with 7 being the most frequent sum and 2 and 12 being the least frequent sums.] Figure 7.26 shows the 36 possible combinations of the two dice. Your program should roll the two dice 36,000 times. Use a one-dimensional 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 all the rolls should be 7).

2061_bd055eba-9e72-4342-8794-8917c7640c3c.png

Reference no: EM131374893

Questions Cloud

Construct a break even graph showing the annual worth : For what break-even salvage value will he be indifferent between taking taxis and buying a car? Construct a break-even graph showing the annual worth of both alternatives as a function of the salvage value of the car. What advice would you give Ga..
Do you still think business plans are needed and why : So, do you still think business plans are needed? Why? Do you think that quality (completeness of vision) of the plan is an indicator of success?
Discuss the status of women : Discuss the status of women in late eighteenth-century/early nineteenth-century England as it is depicted in the excerpt from Pride and Prejudice, using examples from the text.
Construct table that shows the annual worth of the clip job : Construct a table that shows the annual worth of the Clip Job for annual maintenance costs varying from $30 per year to S80 per year.
Write a program that simulates the rolling of two dice : 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 all the rolls should be 7).
Develop a position paper on best practices : Develop a position paper on best practices for teaching English Learners. This paper should contain the student's personal beliefs about and the best models to practice.
What about fare trade living wage and child labor : Should you require that your suppliers comply with Environmentally Friendly practices? What about fare trade, living wage, child labor, and other social considerations?
Discuss about the post given below : Some would argue that incentives are the key to retaining and attracting employees. It has been noted that there are various types of incentive plans. Discuss the advantages and disadvantages of individual incentive plans, team incentive plans, va..
Write a recursive function printarray that takes an array : The function should stop processing and return when the starting subscript equals the ending subscript.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd