Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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 Concepts

Authors: David Kroenke, David J. Auer

3rd Edition

0131986252, 978-0131986251

More Books

Students also viewed these Databases questions

Question

l Identify three internal sources for recruiting.

Answered: 1 week ago

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago