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

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:00
The animal classthis class represents a an animal residing at a zoo. it has a weight (in pounds),height (in inches), a name, and a color. the methods in the class include constructors,getters, and a tostring. you will finish the implementation of these methods. referto the code documentation.1.getters: you will need to implement getter methods. these get a value (froma member variable) in the animal class. you will make a getter method toreturn each variable (weight, height, name, color). reference getname if youare having issues.2.tostring: you will need to finish the tostring method. this returns a stringcontaining information about an animal. the output string should be of theformat: ” (name) , a ( color )â’colored animal . ( weight ) pounds , ( height ) inches .\n”the height and weight are formatted to 1 decimal place. recall from lab 1how to format strings neatly using string. see the reference sectionfor more about string.format.
Answers: 2
question
Computers and Technology, 22.06.2019 02:30
If you turn on the lock alpha button , what happens
Answers: 1
question
Computers and Technology, 22.06.2019 15:30
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
question
Computers and Technology, 22.06.2019 19:20
Write a program that prompts the user to input a string. the program then uses the function substr to remove all the vowels from the string. for example, if str = "there", then after removing all the vowels, str = "thr". after removing all the vowels, output the string. your program must contain a function to remove all the vowels and a function to determine whether a character is a vowel.
Answers: 2
You know the right answer?
Instructions write a program which simulates a lottery, allowing any number of players to participat...
Questions
question
History, 20.08.2019 18:10
Questions on the website: 13722359