Question: Problems: 1) Write a function M-file named TipCale.m, to compute the tip needed according to these rules: If the group has less than 6 people,

 Problems: 1) Write a function M-file named TipCale.m, to compute the

Problems: 1) Write a function M-file named TipCale.m, to compute the tip needed according to these rules: If the group has less than 6 people, the tipis 155, if the group has less than 8 people, the tip should be 18%, if the group is less than 11 people, the tip should be 20%, and groups of 11 or larger should give a 25% tip. The input to the function is the bill amount, and the number of people in the group. The output is the tip. The function should not allow array input and should return an error if either input is an array. Publish the sample case as Tipcalc.pdf For example: >TipCalc (25.87,1) Passed Cody tests AR05

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!