Write a program for a "6/15 Lottery Game". Please take note of the following: 1. It must prompt the user to input a digit for about six times between 0 to 15 only. The output display must specify that it's "Digit 1", "Digit 2", and so on up to "Digit 6". 2. If the inputted digit is greater than 15, the program will notify the player about the incorrect input displaying: "Error! Please input a digit between 0 and 15 only! Repeat your Selection!" And the program will be terminated. 3. If at least one digit matched (exact array position and digit) from the Lottery draw, then the output display must be, as an example: "1 Match! Your Bet is free for the next draw!" 4. If no digit matched from the Lottery draw, then the output display must be, as an example: "Sorry. No Exact Match Found. Try Again!" 5. Note that repetition of input digit chosen by the player is allowed. 6. And finally, if all digit matches, it will give an output display, as an example: "Congratulations! You are a Grand Prize Winner of 100,000,000Php!" SPECIFICATIONS that you need to follow: - You may only use the codes that we studied under our lectures - All lines of codes should have a comment.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%
Write a program for a "6/15 Lottery Game". Please take note of the following:
1. It must prompt the user to input a digit for about six times between 0 to 15 only. The output display must specify that it's "Digit
1", "Digit 2", and so on up to "Digit 6".
2. If the inputted digit is greater than 15, the program will notify the player about the incorrect input displaying:
"Error! Please input a digit between 0 and 15 only! Repeat your Selection!"
And the program will be terminated.
3. If at least one digit matched (exact array position and digit) from the Lottery draw, then the output display must be, as an
example:
"1 Match! Your Bet is free for the next draw!"
4. If no digit matched from the Lottery draw, then the output display must be, as an example:
"Sorry. No Exact Match Found. Try Again!"
5. Note that repetition of input digit chosen by the player is allowed.
6. And finally, if all digit matches, it will give an output display, as an example:
"Congratulations! You are a Grand Prize Winner of 100,000,000Php!"
SPECIFICATIONS that you need to follow:
- You may only use the codes that we studied under our lectures
- All lines of codes should have a comment.
Transcribed Image Text:Write a program for a "6/15 Lottery Game". Please take note of the following: 1. It must prompt the user to input a digit for about six times between 0 to 15 only. The output display must specify that it's "Digit 1", "Digit 2", and so on up to "Digit 6". 2. If the inputted digit is greater than 15, the program will notify the player about the incorrect input displaying: "Error! Please input a digit between 0 and 15 only! Repeat your Selection!" And the program will be terminated. 3. If at least one digit matched (exact array position and digit) from the Lottery draw, then the output display must be, as an example: "1 Match! Your Bet is free for the next draw!" 4. If no digit matched from the Lottery draw, then the output display must be, as an example: "Sorry. No Exact Match Found. Try Again!" 5. Note that repetition of input digit chosen by the player is allowed. 6. And finally, if all digit matches, it will give an output display, as an example: "Congratulations! You are a Grand Prize Winner of 100,000,000Php!" SPECIFICATIONS that you need to follow: - You may only use the codes that we studied under our lectures - All lines of codes should have a comment.
TEST CASE #1:
to 6/15 Lottery Game!
Enter a digit up to six times between to 15:
Digit 113
Digit 217
Digit 3:31
Digit 419
Digit 6:13
Lottery Result: 1210|12|11|99|
Your Chosen number: 3|7|11|9|6|13||
Sorry. No Exact Match Found
Try Agata
Process exited after 9.399 seconds with return value
Press any key to continue
TEST CASE #2:
welcome to 6/15 Lottery Game!
ter a digit up to six times between to 15:
Digit 2:13
Digit 317
Digit 4:10
Digit Si
Lottery Result: 212/7|15|1|12||
your Chosen number: 6|13|7|10|0|4||
Match! Your Bet is free for the next draw!
Process exited after 9.566 seconds with return value e
ress any key to continue...
Transcribed Image Text:TEST CASE #1: to 6/15 Lottery Game! Enter a digit up to six times between to 15: Digit 113 Digit 217 Digit 3:31 Digit 419 Digit 6:13 Lottery Result: 1210|12|11|99| Your Chosen number: 3|7|11|9|6|13|| Sorry. No Exact Match Found Try Agata Process exited after 9.399 seconds with return value Press any key to continue TEST CASE #2: welcome to 6/15 Lottery Game! ter a digit up to six times between to 15: Digit 2:13 Digit 317 Digit 4:10 Digit Si Lottery Result: 212/7|15|1|12|| your Chosen number: 6|13|7|10|0|4|| Match! Your Bet is free for the next draw! Process exited after 9.566 seconds with return value e ress any key to continue...
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY