Create a C++ program that rolls two dice, ten million times, and count outcomes. Then show...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Create a C++ program that rolls two dice, ten million times, and count outcomes. Then show the number of outcomes, and a histogram (See the example below). Your grade will be deducted if your program does not meet these eriteria. Please Submit: 1. A flowchart of your program. 2. Your C++ program with a heading comment, also appropriate spacing and indentation in the program body. 3. Copy of a sereenshot after your program is executed. (4 points) (4 points) (2 points) ELEN 1301 Programming Assignment #9. : Your name. : Your atudent ID . Name Student ID Due date Purpose of the program : Creating a program that counta outcomes of two dice rolls, then ahow a histogram of the outcomes. Section I: Simulate ten million times rolls of two dice, while counting outcomes. (Hint: Use an array of aize 13.) Section 2 : Show the outcome, the numbers of outcomes, and the histogram (one designates 20000) . Your output munt align properly. // Write your own program. Output example: Mooft Vil Se Deg Ce 2: 278041 3: 556324 4: 833889 1 SI 1110480: 6: 1389418 7: 1666591 : B: 1387592 : 1112182 1e: 833513: 11 : 554458 12 277512 C:\UsersLUEE\source\repos \PAB1\DebugPAB1.exe (process 1e86e) exited with code e. Press any key to close this window. .. Create a C++ program that rolls two dice, ten million times, and count outcomes. Then show the number of outcomes, and a histogram (See the example below). Your grade will be deducted if your program does not meet these eriteria. Please Submit: 1. A flowchart of your program. 2. Your C++ program with a heading comment, also appropriate spacing and indentation in the program body. 3. Copy of a sereenshot after your program is executed. (4 points) (4 points) (2 points) ELEN 1301 Programming Assignment #9. : Your name. : Your atudent ID . Name Student ID Due date Purpose of the program : Creating a program that counta outcomes of two dice rolls, then ahow a histogram of the outcomes. Section I: Simulate ten million times rolls of two dice, while counting outcomes. (Hint: Use an array of aize 13.) Section 2 : Show the outcome, the numbers of outcomes, and the histogram (one designates 20000) . Your output munt align properly. // Write your own program. Output example: Mooft Vil Se Deg Ce 2: 278041 3: 556324 4: 833889 1 SI 1110480: 6: 1389418 7: 1666591 : B: 1387592 : 1112182 1e: 833513: 11 : 554458 12 277512 C:\UsersLUEE\source\repos \PAB1\DebugPAB1.exe (process 1e86e) exited with code e. Press any key to close this window. ..
Expert Answer:
Related Book For
Introduction to Probability
ISBN: 978-0716771098
1st edition
Authors: Mark Daniel Ward, Ellen Gundlach
Posted Date:
Students also viewed these accounting questions
-
The data in the following table show the number of shares selling (millions) and the expected price (average of projected low price and projected high price) for 10 selected initial public stock...
-
The following data show the number of defects in 100,000 lines of code in a particular type of software program made in the United States and Japan. Is there enough evidence to claim that there is a...
-
The following figures show the number of defective components supplied each day by a factory. Does this data follow a binomialdistribution? Number of defects 0 23 4 5 Number of days 8 22 33 29 15 3
-
Write a program Tree that takes a command-line argument n and produces the following recursive patterns for n equal to 1, 2, 3, 4, and 8. So b b b h l 4 3 2 1
-
Using the legend provided, classify each of the following statements (more than one answer per statement may be appropriate). Legend D = Applies to the District Court T = Applies to the Tax Court C =...
-
In 2013, Michael has net short-term capital losses of $2,000, a net long-term capital loss of $45,000, and other ordinary taxable income of $45,000. a. Calculate the amount of Michael's deduction for...
-
Consider the gasoline mileage performance data in Table B.3. a. Use the all-possible-regressions approach to find an appropriate regression model. b. Use stepwise regression to specify a subset...
-
Relevant costs for pricing decisions are full costs of the product. Do you agree? Explain?
-
Stroud Corporation is an 80%-owned subsidiary of Pennie, Inc., acquired by Pennie several years ago. On January 1, 2017, Pennie sold land with a book value of $60,000 to Stroud for $90,000. Stroud...
-
Jack, a geologist, had been debating for years whether or not to venture out on his own and operate his own business. He had developed a lot of solid relationships with clients and he believed that...
-
Determine the input power to an electric motor (nm = 90%) supplying a pump (np = 80%) delivering 50 L/sec of water (p= 1000 kg/m; p = 0.001 kg/m.s) from Tank-1 to Tank-2 as shown below if the...
-
Stenson, Inc., imposes a payback cutoff of three years for its international investment projects. Assume the company has the following two projects available. Year Cash Flow A Cash Flow B...
-
In January 2020, Domingo, Inc., acquired 20 percent of the outstanding common stock of Martes, Inc., for $795,000. This investment gave Domingo the ability to exercise significant influence over...
-
The two basic principles in the fair handling of disciplinary issues are "just cause" and "due process." What does each principle require? Explain
-
Spot: NOK 8.0000/USD Forward: NOK 8.2000/USD 12-month USD Libor: +2.00% 12-month NOK Libor: +8.00% WACC: 10.00% Call option: strike price USD 0.125/NOK, premium USD 0.0025/NOK Put option: strike...
-
How do lysosomes maintain cellular homeostasis through their capacity for enzymatic hydrolysis of biomolecules and organelles?
-
m A stone is pushed up with a velocity of 10- from the top of a tall building. Determine at what time the S m stone's displacement is -40m. For ease of calculation use g = 10-2. S
-
6. (Potential Energy and Conservation of Energy) What should be the spring constant k of a spring designed to bring a 1200-kg car to rest from a speed of 95 km/h so that the occupants undergo a...
-
Suppose that the mass of X is PX (1) = 0.12 PX (3) = 0.37 PX (27) = 0.42 PX (31) = 0.09 a. Find E(X). b. Find E(X2). c. Find Vary(X). d. Find E(X2 - 4X).
-
Let X, Y, Z be independent and uniformly distributed on the interval [0, 10]. Find the probability that Y is the middle value, i.e., find P(X < Y < Z or Z < Y < X).
-
A cereal company puts a Star Wars toy watch in each of its boxes as a sales promotion. Twenty percent of the cereal boxes contain a watch with Obi Wan Kenobi on it. You are a huge Obi Wan fan, so you...
-
Universities are interested in increasing donations from their alumni. Donations from former students help fund important building projects, upgrade existing facilities, support student...
-
Figure P16.36 shows the two lowest resonances recorded in the vocal tract of the eastern towhee, a small songbird. a. Is this birds vocal tract better modeled as an open-open tube or an open-closed...
-
Two loudspeakers, 1.0 m apart, emit sound waves with the same frequency along the positive x-axis. Victor, standing on the axis to the right of the speakers, hears no sound. As the frequency is...
Study smarter with the SolutionInn App