subject
Engineering, 24.03.2020 03:25 vibezkj

The lottery game matches three different numbers between 1 and 10. Winning depends on how many matching numbers are provided by a player. The player provides three different numbers between 1 and 10. The player doesn’t have to guess the order of numbers. The payout rules for the lottery are:

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 of all with 1 numbers, 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 function any. Restriction: The function must use switch-case statements to determine the winning.

ansver
Answers: 3

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Determine whether or not it is possible to compress air adiabatically from k to 140 kpa and 400 k. what is the entropy change during this process?
Answers: 3
question
Engineering, 04.07.2019 18:10
Which of the following components of a pid controlled accumulates the error over time and responds to system error after the error has been accumulated? a)- proportional b)- derivative c)- integral d)- on/off.
Answers: 2
question
Engineering, 04.07.2019 18:10
Courses that are developed by subject matter experts, internal or extemal to the college or university. these programs are marketed by the school (clo2) marks a)-vocational schools b)-vendor training c)-colleges & universities d)-continuing education programs
Answers: 2
question
Engineering, 04.07.2019 18:20
Air is compressed isentropically from an initial state of 300 k and 101 kpa to a final temperature of 1000 k. determine the final pressure using the following approaches: (a) approximate analysis (using properties at the average temperature) (b) exact analysis
Answers: 1
You know the right answer?
The lottery game matches three different numbers between 1 and 10. Winning depends on how many match...
Questions
question
Computers and Technology, 11.05.2021 02:40
question
Mathematics, 11.05.2021 02:40
question
History, 11.05.2021 02:40
Questions on the website: 13722363