Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- //Functions
- void mainMenu();
- char mainMenuChoiceF();
- float login();
- void loginMenu();
- int depositAmount();
- int withdrawAmount();
- void displayAmount();
- char createAccount();
- //Global Variables
- char mainMenuChoice;
- char username;
- char password;
- int main()
- {
- mainMenu();
- cin >> mainMenuChoice ;
- mainMenuChoiceF();
- }
- void mainMenu()
- {
- cout << "Hi! Welcome to Future Computer Programmer ATM MAchine" << endl;
- cout << "Please selsect an option from the menu below: " << endl;
- cout << "l -> Login" << endl;
- cout << "c -> Create New Account" << endl;
- cout << "q -> Quit " << endl;
- cout << "Enter your choice: " << endl;
- }
- char mainMenuChoiceF()
- {
- switch (mainMenuChoice)
- {
- case 'l':
- case 'L':
- login();
- break;
- case 'c':
- case 'C':
- createAccount();
- break;
- case 'q':
- case 'Q':
- cout << "Thanks for stopping by!";
- return 0;
- break;
- default:
- cout << "Invalid Menu Input" << endl;
- return 0;
- }
- }
- float login()
- {
- cout << "Please enter your user name: " << endl;
- cin >> username;
- cout << "Please enter your password: " << endl;
- cin >> password;
- }
- char createAccount()
- {
- cout << "Please enter your user name: " << endl;
- cin >> username;
- cout << "Please enter your password: " << endl;
- cin >> password;
- cout << "The username you entered was " << username << "and the password was " << password << endl;
- mainMenu();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement