Question

ASSIGNMENT 5 – POWERBALL SIMULATION Powerball® is a combined large jackpot game and a cash game. ...

ASSIGNMENT 5 – POWERBALL SIMULATION Powerball® is a combined large jackpot game and a cash game. 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 an 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. Your Submission will follow the following example: // Author: John Doe // CIS 3100 BMWA Spring 2018 // Assignment 5 #include #include using namespace std; const int WHITEBALLS = 69; const int WHITEPICKS = 5; const int REDBALLS = 26; ………….. Your code is here …………..

0 0
Add a comment Improve this question Transcribed image text
Answer #1

CODE:

#include<iostream>
#include<stdio.h>
#include<stdlib.h>
using namespace std;
const int WHITEBALLS = 69;
const int WHITEPICKS = 5;
const int REDBALLS = 26;
const int REDPICKS = 1;
int main()
{
   int i=0;
   for(i=1;i<=WHITEPICKS;i++)
   {
       int lucky=1+(rand()%WHITEBALLS);
       cout<<"Lucky Number "<<i<<" for white ball - "<<lucky<<endl;
   }
       int lucky=1+(rand()%REDBALLS);
       cout<<"Lucky Number for red ball - "<<lucky;
  
  
}

OUTPUT :

media%2F8b2%2F8b2a6267-d439-4af7-a0dd-60

Add a comment
Know the answer?
Add Answer to:
ASSIGNMENT 5 – POWERBALL SIMULATION Powerball® is a combined large jackpot game and a cash game. ...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT