subject

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

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 18:20, dinosaur10
Geneva’s manager would like to see some additional information to make sales decisions. enter a formula in cell j4 using the if function to it whether or not the item beaded earrings should go on sale. it will go on sale if its current sales rank (in cell g4) is 8th or lower. (hint: if the cell value is greater than or equal to 8, it will go on sale.)if this condition is true, the item will go on sale. (hint: the if_true value should be “yes”.)if this condition is false, the item doesn’t need to go on sale. (hint: the if_false value should be “-”.)copy the formula created in cell j4 to the range j5: j14
Answers: 2
image
Computers and Technology, 23.06.2019 02:00, kayladgranger
Which demographic challenge is europe currently experiencing? a. an aging and decreasing population b. a baby boomc. an unequal distribution between males and females d. a large group of teenagers moving through the school system(i chose a but i'm unsure)
Answers: 1
image
Computers and Technology, 23.06.2019 16:30, jessisjawsome
If i wanted to include a built-in calendar in a document, what option could i select? draw table insert table insert chart quick tables
Answers: 1
image
Computers and Technology, 24.06.2019 02:40, homework1911
Has anyone seen my grandma shes been gone for 4 years already
Answers: 1
You know the right answer?
Instructions write a program which simulates a lottery, allowing any number of players to participat...

Questions in other subjects:

Konu
Social Studies, 09.09.2020 08:01
Konu
Mathematics, 09.09.2020 08:01
Konu
Mathematics, 09.09.2020 08:01
Konu
Mathematics, 09.09.2020 08:01
Konu
Mathematics, 09.09.2020 08:01
Konu
Mathematics, 09.09.2020 08:01
Konu
Mathematics, 09.09.2020 08:01
Konu
Mathematics, 09.09.2020 08:01
Konu
Mathematics, 09.09.2020 08:01
Konu
Mathematics, 09.09.2020 08:01