Question #7587

i have a project in my Object Oriented Programming. It is about making a cash register

ALGORITHM

1. Enter the item name

2. enter how many item bought

3. enter price of item

4. compute (Total price = item price * number of item)

5. display if there are another item to be bought

6. if yes go back to 1

7. compute 9amount to pay = total price of 1st item + ... total price of last item)

8. display total price to pay

9. Enter amount paid by the customer

10. display change (if Any)

11. Enter if there are another customer

it would mean a lot to me if you could help me. Thank you

ALGORITHM

1. Enter the item name

2. enter how many item bought

3. enter price of item

4. compute (Total price = item price * number of item)

5. display if there are another item to be bought

6. if yes go back to 1

7. compute 9amount to pay = total price of 1st item + ... total price of last item)

8. display total price to pay

9. Enter amount paid by the customer

10. display change (if Any)

11. Enter if there are another customer

it would mean a lot to me if you could help me. Thank you

Expert's answer

Create next variables and take it from output:

float

totalprice

cycles

{

input(

string name;

int count

float

price)

totalprice =

totalprice+count*price;

}

output(totalprice);

input(float

customerpaid)

output(customerpaid - totalprice)

input(is another

customer)

if yes go to begin

float

totalprice

cycles

{

input(

string name;

int count

float

price)

totalprice =

totalprice+count*price;

}

output(totalprice);

input(float

customerpaid)

output(customerpaid - totalprice)

input(is another

customer)

if yes go to begin

Learn more about our help with Assignments: Programming & Computer Science

## Comments

## Leave a comment