Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use Matlab Only Please A=S(Sa)(Sb)(Sc) Where A is the area, a,b, and c, are the side lengths, and S has the following value S=2a+b+c Write

image text in transcribed

Use Matlab Only Please

A=S(Sa)(Sb)(Sc) Where A is the area, a,b, and c, are the side lengths, and S has the following value S=2a+b+c Write a function that takes the side lengths of any triangle as inputs, and outputs the area of the triangle. 3) Write a function called bowlingscore that takes two input variables: pinsknockedDown, which is a 102 matrix of integers between 0 and 10 indicating the number of bowling pins a player knocked down on each of the two frames of a ten-round game, and bonusPins, which is a single integer that indicates the number of pins knocked down on the final bonus frame. bowlingscore should return a single output variable score that indicates the total score the player earned. On each frame, players earn one point for each pin knocked over. In addition if a player knocks over all ten pins on the first frame of a round (i.e. pinsknockedDown (i,2)==10 ), this is called a strike, and the player earns a point for each pin knocked over plus the number of pins knocked over on the following two frames! If a player does not get a strike, but manages to knock over all ten pins by the second frame of a round (i.e. sum(pinsKnockedDown (i,:))==10) then this is called a spare, and the player earns a point for each pin knocked over plus the number of pins knocked over on the next following frame. The bonus frame is only applied if the player earns a strike or a spare on the final tenth round

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Find in the network shown using superposition. 4 A 12 V 2 mA

Answered: 1 week ago

Question

What are some global employee and labor relations problems?

Answered: 1 week ago