Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This question is for C++ Write a program to play the lottery. The program randomly generates a lottery of a three-digit number, prompts the user
This question is for C++
Write a program to play the lottery. The program randomly generates a lottery of a three-digit number, prompts the user to enter a three-digit number, and determines whether the user wins according to the following rules:
If the user input matches the lottery number in the exact order, the award is $10,000.
If all the digits in the user input match all the digits in the lottery number, the award is $3,000.
If one digit (or two digits) in the user input matches a digit in the lottery number, the award is $1,000.
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