LiveWire Peer Support Network

Printable Version of Topic "Need help with C++"

- LiveWire Teen Forums & College Forums (http://www.golivewire.com)
-- (http://www.golivewire.com/forums/support-technical.html)
--- Programming & Application Development (http://www.golivewire.com/forums/forum-211-s-0.html)
---- Need help with C++ (http://www.golivewire.com/forums/peer-yyaiees-support-a.html)


-- Posted by Llane at 9:06 am on Sep. 8, 2008

I need help with starting this program..if anyone is willing to help me...help would be very appreciative..

A customer in a store is purchasing five items. The prices of the items are:

Apple2.99/lb
Orange4.99/lb
Plum5.99/lb
Grape4.99/lb
Cherry3.99/lb

Write a program that holds the price of items and quantity purchased in variables. It should ask the user to enter the quantity purchased for each item in pounds. Once the user enters the quantity of an item, the program should display the item's name, quantity sold, price, sale amount without tax, and amount with tax in one line. The program should also display the subtotal without tax and subtotal with tax so far (assume tax is 10%) in the next line. After entering quantity for all five items the program should display a detail receipt.

Following is a sample execution (bold letters are user input):

Enter Apple Quantity: 3
Apple2.99/lb3lb9.9710.96
Subtotal9.9710.97
Enter Apple Quantity: 3
Apple4.99/lb2lb9.9810.98
Subtotal          19.9521.95

ITEMQtyPriceAmount

Apple 3lb2.99     9.97
Orange 2lb2.99     9.97


-- Posted by Khadgar at 9:10 am on Sep. 8, 2008

It's not hard...

but I'm not doing your school assignment for you.

Here is a flowchart:


DISPLAY - prices on screen
\/
INPUT - amount of apples
\/
DISPLAY - apple data
\/
INPUT - amount of plum
\/
DISPLAY - plum data
\/
INPUT - amount of grapes
\/
DISPLAY - grape data
\/
INPUT - amount of cherries
\/
DISPLAY - cherry data
\/
DISPLAY - total data


www.golivewire.com