Question
Write a function to simulate the Lotto Quick Pick. Lotto is a lottery game where the players choose 6 numbers from 1 to 54, and
Write a function to simulate the Lotto Quick Pick. Lotto is a lottery game where the players choose 6 numbers from 1 to 54, and the Quick Pick option is to have the 6 numbers randomly chosen for you. The function should call the rand() function to produce 6 random numbers between 1 and 54. Make sure to randomize by seeding the rand function. In your main program, ask the user how many Quick Picks they want (between 1 and 10) and call your function that many times.
Include
EXTRA CREDIT: Prevent duplicate numbers from being selected (like in the example output below in Quick Pick 2 the number 22 comes up twice) up to 10 points.
Example output:
How many Quick Picks do you want (1 10)? 11
Please enter a number between 1 and 10: 0
Please enter a number between 1 and 10: 4
Quick Pick 1: 22 54 14 47 25 23
Quick Pick 2: 19 22 38 9 22 2
Quick Pick 3: 13 30 1 28 44 50
Quick Pick 4: 19 12 17 23 52 10
Press any key to continue . . .
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