loan using c++

Upload: carlton-injector-spencer

Post on 06-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Loan Using C++

    1/6

    /// Fortune Plus Limited requires a simple menu driven banking program to monitor their five (5) savings accounts, as shown in the display below. The accounts are identified by account numbers that are stored in an array.

    ? If the Deposit option is chosen, then the user must enter the account number, and also enter the amount to be deposited. If the account number exists, then the amount is added to the existing balance and the user is shown the new ba

    lance. The programme then returns to the menu display as shown below.? If the Withdraw option is chosen, then the user must enter the account number, and also enter the amount to be deducted. If the account number exists, then the amount is deducted, plus a service charge of 5% and the user is shown the new balance. The programme then returns to the menu display as shown below.? If the Query option is chosen, then the user must enter the account number, and if the account number exists, then the balance on a particular account is displayed. The programme then returns to the menu display as shown below.? If the user selects the Exit option by pressing zero (0), then the program will terminate, issuing some appropriate message to the user.

    #include #include #include#include

    using namespace std;

    int savnum[5]={122,123,124,125,126};enum Colors { blue=1, green, cyan, red, purple, yellow, grey, dgrey, hblue, hgreen, hred, hpurple, hyellow, hwhite };

    int savacc[5]={0,0,0,0,0};int sum=0;int minus;int selection;int acc;int money;char yesorno;void deposit();

    void withdraw();void query();void btm();

    int main(){

    system("color 01");cout

  • 8/3/2019 Loan Using C++

    2/6

    switch (selection){

    case 1:deposit();

    case 2:

    withdraw();case 3:

    query();case 0:

    system("cls");cout

  • 8/3/2019 Loan Using C++

    3/6

    getch();btm();}

    else if (acc==savnum[1]){

    cout

  • 8/3/2019 Loan Using C++

    4/6

    system("cls");cout

  • 8/3/2019 Loan Using C++

    5/6

    cout

  • 8/3/2019 Loan Using C++

    6/6

    {cout