|
||||||
| C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
I'm suppose to create a program for a commercial bank.
The program should start with the following menu: Press 1. To add new customer 2. To carry out a transaction 3. To exit If the user selects 1 the program should ask for name, address, telephone number and the amount depositing. If the user selects 2 he is given another menu. Press 1. For Withdrawal 2.For Deposit 3. For Enquiry If the user selects 1 which is withdrawal, he/she should ask the user for their customer no. and the amount to withdraw. If the user select 2 which is deposit ask the user for customer number and the amount to deposit. If the user selects 3 ask for the customer number and print the customers balance. After each transaction print the users balance. This is what i have so far: c Code:
I am having problems with assigning customer numbers and also in printing the balances. Last edited by Jaan; 04-01-2008 at 12:11 AM. Reason: Use tags when you're posting your codes! |
| Sponsored Links |
|
|
|
|||||
|
It looks like you are having additional problems as well.
As far as assigning customer numbers, you will need a variable to store them in (your variable names don't make it clear if this has been done or not), then create a number that isn't being used (a variable can store the largest customer number). To print the balances, you need to create some code for that, first. Other observations: you can only perform one menu option before exiting. You don't have support for multiple customers. You are using a LOT of global variables. Have you created a flowchart or anything to sketch out the behavior of this program?
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
| Xav | ........ | 1455.48 |
| MeTh0Dz|Reb0rn | ........ | 1089.45 |
| WingedPanther | ........ | 977.76 |
| marwex89 | ........ | 962.9 |
| morefood2001 | ........ | 911.18 |
| John | ........ | 910.37 |
| Brandon W | ........ | 822.79 |
| chili5 | ........ | 312.39 |
| Steve.L | ........ | 276.28 |
| dcs | ........ | 253.49 |
Goal: 100,000 Posts
Complete: 84%