![]() |
|
#1
|
|||
|
|||
i need urgent help with arrays!!Hi,
This is what the output to the screen should look like. My code so far is below it.I'm really stuck right now and don't know what to do. Can someone please help me!! Thanks Point of Sale Terminal ----------------- 1. Record a Transaction 2. Transaction History 0. Exit Program Please enter your selection: 2 Transaction History ------------------- -------------------------------- Total payments: $0 Total refunds: $0 Ending balance: $0 -------------------------------- 1. Record a Transaction 2. Transaction History 0. Exit Program Please enter your selection: 1 Please enter the amount of the transaction (payments as positive, refunds as negative): 50 Please enter a one-word description: shirt Transaction recorded for shirt. 1. Record a Transaction 2. Transaction History 0. Exit Program Please enter your selection: 1 Please enter the amount of the transaction (payments as positive, refunds as negative): 75 Please enter a one-word description: sweater Transaction recorded for sweater. 1. Record a Transaction 2. Transaction History 0. Exit Program Please enter your selection: 1 Please enter the amount of the transaction (payments as positive, refunds as negative): -35 Please enter a one-word description: belt Transaction recorded for belt. 1. Record a Transaction 2. Transaction History 0. Exit Program Please enter your selection: 1 Please enter the amount of the transaction (payments as positive, refunds as negative): 100 Please enter a one-word description: jacket Transaction recorded for jacket. 1. Record a Transaction 2. Transaction History 0. Exit Program Please enter your selection: 1 Please enter the amount of the transaction (payments as positive, refunds as negative): -45 Please enter a one-word description: shoes Transaction recorded for shoes. 1. Record a Transaction 2. Transaction History 0. Exit Program Please enter your selection: 2 Transaction History ------------------- 1. Payment: $50 - shirt 2. Payment: $75 - sweater 3. Refund: $35 - belt 4. Payment: $100 - jacket 5. Refund: $45 - shoes -------------------------------- Total payments: $225 Total refunds: $80 Ending balance: $145 -------------------------------- 1. Record a Transaction 2. Transaction History 0. Exit Program Please enter your selection: 0 Closing Account... *** End of Program *** CPP / C++ / C Code:
Last edited by LuciWiz : 14-Oct-2006 at 18:12.
Reason: Please insert your C/C++ code between [cpp] & [/cpp] tags
|
|
#2
|
|||
|
|||
Re: i need urgent help with arrays!!I am see this,
CPP / C++ / C Code:
What part is not displaying correctly? |
|
#3
|
|||
|
|||
Re: i need urgent help with arrays!!The program runs and compiles with no errors. I don't know how to store a transaction after it has been entered. I think i have to save the value into an array and then have that value flow into the function. I just don't know how to do this?
|
|
#4
|
|||
|
|||
Re: i need urgent help with arrays!!Quote:
CPP / C++ / C Code:
|
Recent GIDBlog
Meeting the local Iraqis by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Dynamic vs Static Arrays | WaltP | Miscellaneous Programming Forum | 5 | 16-Feb-2006 15:54 |
| storing of multidimensional arrays | alcoholic | C Programming Language | 1 | 06-Jan-2006 07:20 |
| Noob question on c arrays and functions | brett | C Programming Language | 1 | 20-Apr-2005 03:59 |
| Knight tour (arrays help needed) | dilmv | C++ Forum | 7 | 18-Oct-2004 14:31 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The