Question

A store owner asks you to write a program for use in the checkout process. The program should:

$\begin{matrix} \text{Prompt the user to enter the cost of the first item.}\\ \text{Continue to prompt for additional items, until the user enters 0.}\\ \text{Display the total.}\\ \text{Prompt for the dollar amount the customer submits as payment.}\\ \text{Display the change due.}\\ \end{matrix}$

Verified

Step 1

1 of 2

Steps:

$1- \bf{State\;the\; problem}$

Create a program for a store that allows the customer to inter the price of his items, display the total, enter the payment and display change due.

$2- \bf{State\;the\; inputs\; and\; the\; outputs}$

Input are each item price, the customer payment . .

The output are display the total and display change due..

$3- \bf{Develope\; a\; MATLAB \;code:}$

Create the MATLAB solution and run the m-file in as shown. Then enter each item price the Total will be displayed. then enter costumer payment and the change due will be displayed as shown.

Create an account to view solutions

2,102 solutions

Physics for Scientists and Engineers: A Strategic Approach with Modern Physics

4th EditionRandall D. Knight
3,509 solutions

MATLAB for Engineers

5th EditionHolly Moore
313 solutions