Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please show those three files greatly appreciate it Instructions: Using C++, Create a project with the header file the driver file and the main file

image text in transcribed

please show those three files greatly appreciate it

Instructions: Using C++, Create a project with the header file the driver file and the main file please show those in it, write solution for the problem below. You are required to submit three (3) files, Lottery.h, Lottery.cpp, and Tester.cpp. Your code must be commented appropriately. Write a program that simulates a lottery. The program should have an array of five integers named lottery, and should generate a random number in the range of 0 through 9 for each element in the array. The user should enter five digits which should be stored in an integer array named user. The program is to compare the corresponding elements in the two arrays and keep a count of the digits that match. For example, the following shows the lottery array and the user array with sample numbers stored in each. There are two matching digits (elements 2 and 4). Lottery array 7 4 91 3 User array: 4 2 9 7 3 The program should display the random numbers stored in the lottery array and the number of matching digits. If all of the digits match, display a message proclaiming the user as a grand prize winner

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

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago