Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C PROGRAMMING Make a lottery line inspection program. The program first asks the user how many lines to process in the program (max 5). The
C PROGRAMMING
Make a lottery line inspection program. The program first asks the user how many lines to process in the program (max 5). The program then reads the number of lottery lines (number at a time) entered from the user manually and draws the remaining lines (up to a maximum of five lines) on behalf of the user with random numbers (naturally between 1-40). Finally, the program draws the correct lottery numbers and notifies the user how he or she did on each grid. The program prints the user's grids and the correct lottery line and information on how many numbers and additional numbers there were in each line. Example run: How many lines do you want to enter (max. 5 lines)> 2 Enter the number 1 in line 1> # Enter the number 2 in line 1> # Enter the number 3 in line 1> # Enter the 4th number on line 1> # Enter the 5th number in line 1> # Enter the 6th number on line 1> # Enter the number 7 in line 1> # Enter the number 1 in line 2> ## Enter the number 2 in line 2> ## Enter the number 3 in line 2> ## Enter the 4th number in line 2> ## Enter the 5th number in line 2> ## Enter the number 6 in line 2> ## Enter the 7th number in line 2> # Lottery lines: # # # # # # # # ## ## ## ## ## ## # # # # ## ## ## # ## ## ## ## ## ## ## ## ## ## ## ## ## Right line: # # ## ## ## ## ## additional numbers: # ## ## Line 1 contains # correct and # additional numbers Line 2 contains # correct and # additional numbers Line 3 has # correct and # additional numbers Line 4 has # correct and # additional numbers Line 5 has # correct and # additional numbers
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