Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Dice game A game rolls a die 1 0 times and counts how many times the number 5 or 6 shows up . If there
Dice game
A game rolls a die times and counts how many times the number or shows up If there are
a total of seven or more times, the win is dollars.
a total of four or more times but less than seven, the win is dollars.
a total of three or less, the win is dollars.
Write a function called diceGame that has an input row array of integers representing the ten rolls of dice, and calculates the pay out. For example:
tenRollsOfDice randi
payOut diceGame tenRollsOfDice
tenRollsOfDice
payout
Function
Save
C Reset
i MATLAB Documentation
function payout diceGame rolls
Your code goes here
tenRollsofDice ;
payout ;
end
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started