Question
Sam purchases five lottery tickets a week, playing ten 5-digit lucky combinations. Write a program that allows Ms. Crockett to enter in these five numbers,
Sam purchases five lottery tickets a week, playing ten 5-digit lucky combinations. Write a program that allows Ms. Crockett to enter in these five numbers, which you will enter into an array or a vector. (You better make sure she enters in 5 digits not more or less). Your program should then randomly generate this weeks winning 5-digit number (Random.h & Random.cpp is provided for you) and let Sam know if she won the lottery (or not). Come up with a fun way to tell her if he won by adding in some cool ASCII art like this (http://patorjk.com/software/taag/#p=display&f=Big%20Money-ne&t=YOU%20WON). The program should perform a binary search through the elements of Sam numbers to see if the randomly generated number was a match (wins!) In order for binary search to work, remember that the list needs to be sorted. Use whichever sort algorithm you want. It just has to work. SAMPLE OUTPUT
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started