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, 23.06.2019 01:10, brooklynneramos9956
Problem 1 - hashing we would like to use initials to locate an individual. for instance, mel should locate the person mark e. lehr. note: this is all upper case. generate a hash function for the above using the numbers on your telephone. you know, each letter has a number associated with it, so examine your telephone keypad. generate 512 random 3 letter initials and take statistics on a linked list array size 512 to hold this information report how many have no elements, 1 element, 2 elements, does this agree with the hashing statistics distribution?
Answers: 1
image
Computers and Technology, 23.06.2019 16:30, mirmir62
Which of the following is not an enhancement to the standard wiki to make it more attractive for corporations? encryptionwork spacespermission toolspredictive text
Answers: 2
image
Computers and Technology, 23.06.2019 21:00, shyshy1791
Which set of steps will organize the data to only show foods with more than 100 calories and rank their sugar content from greatest to least?
Answers: 1
image
Computers and Technology, 24.06.2019 10:10, juliana0122
Scanning the road can be thought of as a
Answers: 2
You know the right answer?
Instructions write a program which simulates a lottery, allowing any number of players to participat...

Questions in other subjects: