Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ plz (20 Points) Suppose you are to develop a program to play the lottery. The program randomly generates a lottery of a two-digit number,

image text in transcribedimage text in transcribedC++ plz

(20 Points) Suppose you are to develop a program to play the lottery. The program randomly generates a lottery of a two-digit number, prompts the user to enter a two-digit number, and determines whether the user wins according to the following rule: 1. If the user input matches the lottery number in the exact order, the award is $10,000. 2. If all the digits in the user input match all the digits in the lottery number, the award is $3,000. 3. If one digit in the user input matches a digit in the lottery number, the award is $1,000. Fill in the blanks in the program below. // assume all libraries are included int main() { srand(time(0)); int guess; // Generate a random two-digit lottery number between 10 and 99 int lottery = // Prompt the user to enter a guess cout

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_2

Step: 3

blur-text-image_3

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

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions