Computers and Technology

Instructions write a program which simulates a lottery, allowing any number of players to participate in the lottery game. the program should declare, in main, an array of five integers named lottery and a vector of integers named player. then have the user enter 5 different digits in an overloaded function to fill the lottery array. any number of players can now play the lottery. in main repeatedly: -have the user enter a lottery player's full name -have the user enter 5 different integers in a second version of the overloaded function to fill the vector. -validate that all digits for the array and vector fall in the range of zero to nine. -have your program use loops to match the numbers in the array to those in the vector to determine which numbers in the player vector match any of the numbers in the lottery array (i. e., not just the numbers in "corresponding" positions). -display in main the player's name, the player vector, the number of matching digits, and the digits which match, and display a congratulatory "grand prize" message, with the player's name, if all digits match. -then have another player try the lottery, or quit the game. you may not sort the array nor the vector, and must use loops to process both. remember that vectors can contain an unknown number of values. -the lottery array consists of: 7, 4, 9, 1, 3 provide two screen prints: -name: iam a. gambler, with player vector: 0, 2, 9, 6, 3 -name: imhooked, with player vector: 1, 9, 7, 3, 4

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 15:30, gudon986732
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
image
Computers and Technology, 22.06.2019 19:20, SundaeSunday
Consider the following code snippet: #ifndef cashregister_h#define cashregister_hconst double max_balance = 6000000.0; class cashregister{public: cashregister(); cashregister(double new_balance); void set_balance(double new_balance); double get_balance() const; private: double balance[12]; }; double get_monthly_balance(cashregister bk, int month); #endifwhich of the following is correct? a)the header file is correct as given. b)the definition of max_balance should be removed since header files should not contain constants. c)the definition of cashregister should be removed since header files should not contain class definitions. d)the body of the get_monthly_balance function should be added to the header file.
Answers: 1
image
Computers and Technology, 22.06.2019 21:40, tdahna0403
Develop a function to create a document in the mongodb database “city” in the collection “inspections.” be sure it can handle error conditions gracefully. a. input -> argument to function will be set of key/value pairs in the data type acceptable to the mongodb driver insert api call b. return -> true if successful insert else false (require a screenshot)
Answers: 2
image
Computers and Technology, 23.06.2019 00:00, addisonrausch
What season was better from fortnite?
Answers: 2
Do you know the correct answer?
Instructions write a program which simulates a lottery, allowing any number of players to participat...

Questions in other subjects:

Konu
Mathematics, 30.01.2020 17:51