subject

The lottery game matches three different integer numbers between 1 and 10. winning depends on how many matching numbers are provided by a player. the player provides three different integers between 1 and 10. if there is a match of all 3 numbers, the winning $ 1000. if there is a match with 2 numbers, the winning $ 10. if there is a match with 1 number, the winning $ 1. with no match, the winning is $0. write a function lottery3 that checks three numbers provided by a player and determine the winning amount. if the user mistakenly enters same number twice/thrice and if that number matches one of the winning numbers, the code should count that number only once and display correct result. the player doesn’t have to guess the order of numbers. the input to the function lottery3 can have up to two input arguments. the first input argument is a row array numbers with 3 numbers. if the second argument input testcode is present, and is a row vector of 3 values, the function lottery3 uses the code in testcode as the three winning numbers (the test must be three different integer numbers between 1 and 10), else three different numbers will be automatically generated by testcode. the ouput should return the variable winnings and the three winning numbers in the row array winnumbers. hint: make use of the internal functions any and nargin. restriction: the function must use switch-case statements to determine the winning.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:30
Type the correct answer in the box. spell all words correctly. under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 3
question
Computers and Technology, 22.06.2019 22:40
Write a program that defines symbolic names for several string literals (chars between quotes). * use each symbolic name in a variable definition. * use of symbolic to compose the assembly code instruction set can perform vara = (vara - varb) + (varc - vard); ensure that variable is in unsigned integer data type. * you should also further enhance your symbolic logic block to to perform expression by introducing addition substitution rule. vara = (vara+varb) - (varc+vard). required: debug the disassembly code and note down the address and memory information.
Answers: 3
question
Computers and Technology, 23.06.2019 02:30
Three out of five seniors remain undecided about a college major at the end of their senior year.
Answers: 3
question
Computers and Technology, 23.06.2019 09:10
Effective character encoding requires standardized code. compatible browsers. common languages. identical operating systems.
Answers: 1
You know the right answer?
The lottery game matches three different integer numbers between 1 and 10. winning depends on how ma...
Questions
question
Mathematics, 22.06.2021 23:30
question
Mathematics, 22.06.2021 23:30
question
Mathematics, 22.06.2021 23:30
Questions on the website: 13722359