Write a program that will ask the user for the name of an item, the part number of the item, the cost of the item and the quantity of the item. The program will then calculate the total cost of the item. The program will also keep track of the running total for an undetermined amount of items (Hint: Sentinel Loop).
The name of the item, part number of the item, cost of the item, quantity of the item, total cost of the item will be output to a file (Invoice.txt). The running total of all items will be output to the bottom of the file.
Example output file:
Name of Item Part Number of Item Cost of Item Quantity Total Cost
Hammer 12-34-A $12.00 2 $24.00
Candy Bar 8A87 $0.75 3 $1.50
Total Cost: $25.50
plumsauce5 0 Newbie Poster
Stazloz 0 Light Poster
plumsauce5 0 Newbie Poster
plumsauce5 0 Newbie Poster
Stazloz 0 Light Poster
plumsauce5 0 Newbie Poster
Stazloz 0 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.