![]() |
|
#1
|
|||
|
|||
need help for c++ code ....[c++]
hi... i really need help writing this program please i cant do it............ the instructions are.... a mail order house sells five diffrent products whose retail prices are shown in the followingtable: product# retail price: 178 $2.98 185 $4.59 199 $9.98 208 $4.19 288 $6.87 there are several permanent customers who are ordering these products every month . the program should accept (for every customer) pairs of numbers (product num and quantity sold)and calculate the total retail value of all products sold last month. 8% discount is applied if the retail value exceeds $200. Program output should include customer's ID (4 digit number) and total retail value for each customer . in additon the program should calculate and displayhte number of customers , total sales and average retail value. the program should also allow user to run multiple sets of data and to terminate the program when there is no data anymore. thank u your help will be appriciated a lot...... |
|
#2
|
|||
|
|||
Re: need help for c++ code ....I would first work out how to write the code so that you can only input one item and forget the loop for now.
You might try two arrays one for, CPP / C++ / C Code:
CPP / C++ / C Code:
Once you get that to work then move onto other parts of the program. Post back with ant questions. Last edited by Sokar : 05-Dec-2005 at 18:24.
|
|
#3
|
||||
|
||||
Re: need help for c++ code ....Hi cindy,
Welcome to GID Forums. Just a little correction on Sokar's description: The array should be declared like this: CPP / C++ / C Code:
CPP / C++ / C Code:
I hope you know arrays. You should have one loop to get the values from the user, say a do while loop. How much in C++ have you studied? Do you know dynamic memory location, or vectors? Regards, Paramesh. __________________
Don't walk in front of me, I may not follow. Don't walk behind me, I may not lead. Just walk beside me and be my friend. |
|
#4
|
|||
|
|||
Re: need help for c++ code ....Quote:
Thank you for the correction on that blunder. |
Recent GIDBlog
NARMY by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: Formatting C / C++ code | WaltP | C Programming Language | 1 | 06-Jan-2008 23:59 |
| Image processing:Stentiford and Holt Thinning Source code in C or C++ | ladyscarlet99 | C++ Forum | 1 | 09-Sep-2005 03:29 |
| Guidelines for posting requests for help - UPDATED! | WaltP | C++ Forum | 0 | 21-Apr-2005 02:44 |
| Problem with int mixed with char,... | leitz | C++ Forum | 17 | 07-Dec-2004 20:56 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The