Engineering
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.

answer
Answers: 3

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, heidiburgos1own6c0
Fluids at rest possess no flow energy. a)- true b)- false
Answers: 3
image
Engineering, 04.07.2019 18:10, soreese02
An ideal otto cycle with air as the working fluid has a compression ratio of 8. the minimum and maximum temperatures in the cycle are 300 k and 1340 k. use constant specific heats at room temperature to determine (a) the amount of heat transferred to the air during the heat- addition kj/kg, (b) the thermal efficiency, and (c) the thermal efficiency of a carnot cycle ope limits. process, in rating between the same temperature
Answers: 2
image
Engineering, 04.07.2019 18:10, chadatkin
Which of the following ziegler nichols tuning methods the response of the controller to a step input should exhibit an s-shaped curve? a)-open loop mode b)-closed loop mode c)-both modes (open & closed) d)-none of the modes (open & closed)
Answers: 3
image
Engineering, 04.07.2019 18:10, juansoto227711
Journeyman training is usually related (clo2) a)-to specific tasks b)-to cost analysis of maintenance task c)-to control process to ensure quality d)-to installation of machinery
Answers: 2
Do you know the correct answer?
The lottery game matches three different numbers between 1 and 10. Winning depends on how many match...

Questions in other subjects:

Konu
Mathematics, 07.04.2021 08:20
Konu
English, 07.04.2021 08:20