Question: use matlab: Splitting the restaurant bill Write a program that obtains two user inputs: N = the number of people who went to a restaurant

use matlab: Splitting the restaurant bill Write a program that obtains two user inputs:

N = the number of people who went to a restaurant together

Cost = the total bill

Add a 15% tip to the total bill, and calculate total cost per person. Display this to the command line. You should include an error statement instead if the user inputs negative values for N or Cost.

Test Case: If 5 people went out, and the bill was $120, the cost per person should be $27.60

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!