Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ POWERBALL SIMULATION Every Wednesday and Saturday night at 10:59 p.m. Eastern Time, we draw five white balls out of a drum with 69 balls

C++ POWERBALL SIMULATION

Every Wednesday and Saturday night at 10:59 p.m. Eastern Time, we draw five white balls out of a drum with 69 balls (1-69) and one red ball out of a drum with 26 red balls (1-26). Draw sales cut off at least 59 minutes before the draw. Check for local cut-off time. Players win by matching one of the 9 Ways to Win. The jackpot (won by matching all five white balls in any order and the red Powerball) is either an annuitized prize paid out over 29 years (30 payments) or a lump sum payment. Each ticket costs $2. If the winner chooses the annuity, the annual payment will be increased each year by the percentage set out in the Powerball game rules. Your assignment is to write a EZ-Play program that would deliver 6 lucky numbers (5 white ball numbers and 1 red power ball number) for every game the player pays.

#include

#include

using namespace std;

const int WHITEBALLS = 69;

const int WHITEPICKS = 5;

const int REDBALLS = 26;

The result should be like this:

image text in transcribed

C:Windows system321cmd.exe How nany ganes would you like to play? 5 White Balls are: 1 14 23 29 31 Power Ball is: 25 White Balls are: 3 11 19 43 49 Power Ball is: 16 White Balls are 4 24 44 48 53 PowerBall is: 25 White Balls are: 14 15 16 44 61 Power Ball is: 21 White Balls are: 5 13 18 48 57 Power Ball is: 5 Press any key to continue

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions