Results 1 to 2 of 2
  1. #1
    Fresh[Verde]'s Avatar
    Join Date
    Mar 2017
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0

    My C++ Bank Program - Fresh[Verde]

    #include <iostream>
    #include <string>
    #include <Windows.h>
    #include <Random>

    using namespace std;

    class Bank
    {
    public:

    void CreateAccount()
    {
    system("cls");
    Sleep(1000);

    cout << "Enter An Account Id And You Will Be Ready To Go!" << endl;
    cin >> AccountId;

    Sleep(1000);

    cout << "Your Login Will Be Your Id...Returing To Login..." << endl;

    Sleep(2000);
    system("cls");

    Login();
    }

    void Login()
    {
    system("cls");
    Sleep(1000);

    cout << "Input Your Login:" << endl;
    cin >> LoginId;

    LoginReturn();
    }

    void BankMenu()
    {
    system("cls");
    Sleep(1000);

    cout << "Welcome User: " << AccountId << endl;

    cout << endl;

    do {

    cout << "Balance(1)" << endl;

    cout << endl;

    cout << "Withdraw(2)" << endl;

    cout << endl;

    cout << "Deposit(3)" << endl;

    cout << endl;

    cout << "Exit(4)" << endl;

    cout << endl;

    cout << "Option:";

    cin >> Banker;

    BankReturn();

    Sleep(5000);

    system("cls");

    } while (!exit);
    }

    void Balance()
    {
    system("cls");
    Sleep(1000);

    cout << "Your Balance Is:" << BalanceTotal;

    Sleep(4000);
    system("cls");

    BankMenu();
    }

    void Withdraw()
    {
    system("cls");
    Sleep(1000);

    cout << "Your Balance Is:" << BalanceTotal << endl;

    cout << "Withdraw Amount:" << endl;
    cin >> WithdrawAccount;

    cout << endl;

    cout << "New Balance:" << BalanceTotal - WithdrawAccount << endl;

    Sleep(5000);
    system("cls");

    BankMenu();
    }

    void Deposit()
    {
    system("cls");
    Sleep(1000);

    cout << "Your Balance Is:" << BalanceTotal << endl;

    cout << "Deposit Amount:" << endl;
    cin >> DepositAccount;

    cout << endl;

    cout << "New Balance:" << BalanceTotal + DepositAccount;

    Sleep(5000);
    system("cls");

    BankMenu();
    }
    void LoginReturn()
    {
    if (LoginId == AccountId)
    {
    system("cls");
    Sleep(1000);

    cout << endl;

    cout << "You Have Logged In You Will Now Be Returned To The Main Bank Menu." << endl;

    Sleep(2000);
    system("cls");

    BankMenu();
    }
    else
    {
    system("cls");
    Sleep(1000);

    cout << endl;

    cout << "Incorrect!" << endl;

    Sleep(2000);
    system("cls");

    ExitProcess(0);
    }
    }

    void BankReturn()
    {
    if (Banker == balance)
    {
    Balance();
    }
    else if (Banker == deposit)
    {
    Deposit();
    }
    else if (Banker == withdraw)
    {
    Withdraw();
    }
    else if (Banker == exit)
    {
    system("cls");
    Sleep(1000);

    cout << "Ending Process..." << endl;

    Sleep(3000);
    system("cls");

    ExitProcess(0);
    }
    else if (Banker != withdraw || Banker != deposit || Banker != balance)
    {
    system("cls");
    Sleep(1000);

    cout << "Unrecognized Input!" << endl;

    Sleep(2000);
    system("cls");

    ExitProcess(0);
    }
    }
    private:
    int AccountId;
    char Banker;
    int LoginId;
    int BalanceTotal = 0;
    int DepositAccount;
    int WithdrawAccount;
    //Should Probably Use An Array Below
    char balance = '1';
    char exit = '4';
    char withdraw = '2';
    char deposit = '3';
    };

    class Person
    {
    public:


    void Start()
    {
    system("cls");
    Sleep(1000);

    cout << "To Create An Account Input N, To Exit Input Y..." << endl;

    cin >> NewAccount;

    switch (NewAccount)
    {

    case 'N':

    cout << "Sending You To Account Creation...." << endl;

    Sleep(3000);

    bank.CreateAccount();

    case 'Y':

    system("cls");
    Sleep(1000);

    cout << "Exitting The Process..." << endl;

    Sleep(3000);
    system("cls");

    ExitProcess(0);
    }

    }
    private:

    char NewAccount;
    Bank bank;
    };
    int main()
    {
    Bank bank;
    Person person;

    SetConsoleTitle(L"Bank Program - By Verde");

    HANDLE Colour = GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleTextAttribute(Colour, FOREGROUND_RED);

    person.Start();


    }

  2. #2
    Silent's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    5,070
    Reputation
    2172
    Thanks
    8,474
    My Mood
    Bitchy
    I don't see the part where you store your passwords in raw text...
    Click Here to visit the official MPGH wiki! Keep up with the latest news and information on games and MPGH! To check out pages dedicated to games, see the links below!











    dd/mm/yyyy
    Member - 31/01/2015
    Premium - 12/09/2016
    Call of Duty minion - 05/11/2016 - 05/11/2019
    BattleOn minion - 28/02/2017 - 05/11/2019
    Battlefield minion - 30/05/2017 - 05/11/2019
    Other Semi-Popular First Person Shooter Hacks minion - 21/09/2017 - 17/09/2019
    Publicist - 07/11/2017 - 02/08/2018
    Cock Sucker - 01/12/2017 - Unknown
    Minion+ - 06/03/2018 - 05/11/2019
    Fortnite minion - 08/05/2018 - 05/11/2019
    Head Publicist - 08/10/2018 - 10/01/2020
    Developer Team - 26/10/2019 - 10/01/2020
    Former Staff - 10/01/2020



Similar Threads

  1. Replies: 5
    Last Post: 07-02-2015, 03:04 PM
  2. [Solved] Is there any program/hack to get bank/ and or inventory space?
    By k1ngqu33n in forum Adventure Quest Worlds (AQW) Help
    Replies: 3
    Last Post: 11-30-2013, 03:54 PM
  3. [WTS] Fresh USA Bank verified paypal accounts
    By VPPSeller in forum Selling Accounts/Keys/Items
    Replies: 0
    Last Post: 09-20-2011, 06:51 PM
  4. Runescape 2 auto programs
    By fabled in forum Hack Requests
    Replies: 19
    Last Post: 09-05-2007, 01:43 PM
  5. Problem Wit Hacking Programs
    By f5awp in forum General Gaming
    Replies: 5
    Last Post: 01-10-2006, 05:44 AM