Question: How do I solve this in MATLAB (I just need #8 please)? Question #7. Using an if/else construct, write a script to calculate the tip

How do I solve this in MATLAB (I just need #8 please)?

How do I solve this in MATLAB (I just need #8 please)?

Question \#7. Using an if/else construct, write a script to calculate the

Question \#7. Using an if/else construct, write a script to calculate the tip of a restaurant bill. - Using the command window, ask the user to enter the bill amount. - Then ask the user to type if the service was 1) good, 2) average, or 3) bad. 1. If the user typed good, display the bill total including a 20% tip. 2. If the user typed average, display the bill total including an 18% tip. 3. If the user typed bad, display the total including a 15% tip. 4. If the user entered anything other than the three acceptable words, print that the input was invalid and exit the script using a return statement. - Be sure your calculated total is formatted as currency (including a dollar sign and precision to two decimal places). Question \#8. Rewrite the same restaurant tip script from Question 7, but implement it using a case/switch construct instead of an if/else construct

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!