Question: Design a lottery system that does the following: The computer randomly generates 6 random numbers between 1 - 90 without repetition. The user can guess
Design a lottery system that does the following: The computer randomly generates 6 random numbers between 1 - 90 without repetition. The user can guess the lucky number. The user can only enter a minimum of 2 guesses or a maximum of 6 guesses. The user can exit their entry either by entering "Q" or "Quit" and the entry automatically stops if the user enters a maximum of 6 numbers between 1 and 90 without repetition. if the user guesses one number correctly the machine prints the user guesses, the lucky numbers and says, "Sorry you guessed only one correctly.". if the user guesses two numbers correctly the machine prints the user guesses, the lucky numbers and says, "Congratulations you guess 2 correctly.". if the user guesses three numbers correctly the machine prints the user guesses, the lucky numbers and says, "Congratulations you guess 3 correctly.". if the user guesses four numbers correctly the machine prints the user guesses, the lucky numbers and says, "Congratulations you guess 4 correctly.". if the user guesses five numbers correctly the machine prints the user guesses, the lucky numbers and says, "Congratulations you guessed 5 correctly.". if the user guesses all 6 numbers correctly the machine prints the user guesses, the lucky numbers and says, "Congratulations you just won a Jackpot.". NB:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
