Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Develop a C++ program for lottery and start with #include #include (20 points): Develop a program to play lotten. The program randomly number, prompts the

Develop a C++ program for lottery and start with
#include
#include
image text in transcribed
(20 points): Develop a program to play lotten. The program randomly number, prompts the user to enter a according to the following rules: The program randomly generates a lottery of a two-digit number, and determines whether the user wins 1. If the user input matches the lo 2. If all digits in the user input matc 3. If one digit in the user inp Note that the digits of a number is number O is treated as 00 in the program ber in the exact order, the award is $10,000 all digits in the lottery number, the award is 3,000 ut matches a digit in the lottery number, the award is $1,000 two-digit number may.be 0. If a number is less than 10, we assume the by a 0 to form a two-digit number. For example, number 8 is treated as 08 and preceded nter your lottery pick (two digits): 41 he lottery number is 41 xact match: you win $1e,eee Press any key to continue " . . nter your lottery pick (two digits): 15 The lottery number is 11 latch one digit: you win $1,eee Press any key to continue. Enter your lottery pick (two digits): 20 The lottery number is 39 orry, no match ress any key to continue

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

3. Existing organizations and programs constrain behavior.

Answered: 1 week ago