Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- system("color a");
- int choose;
- logo();
- cout << " Choose Option:";
- cout << "[1] Customer";
- cout << " [2] Admin";
- cin >> choose;
- switch (choose)
- {
- case 1 :
- system("CLS");
- customer_interface();
- int customer_interface()
- {
- int choose;
- logo();
- cout << " Choose Option:";
- cout << " [1] Buy Ticket/s";
- cout << " [2] Back";
- cout << " [3] Exit";
- cin >> choose;
- switch (choose)
- {
- case 1 :
- system("CLS");
- register_customer();
- break;
- case 2 :
- system("CLS");
- main();
- break;
- case 3 :
- system("CLS");
- logo();
- cout << "=========T H A N K Y O U !========";
- exit(0);
- }
- }
- break;
- case 2 :
- int admin_login()
- {
- system("CLS");
- string username = "Admin";
- int password = 1234;
- logo();
- cout << "Enter Username: ";
- cin >> username;
- if (username != "Admin")
- {
- cout << "You've entered the wrong username, try again!\n\n";
- system("pause");
- system("CLS");
- admin_login();
- }
- cout << "Enter Password: ";
- cin >> password;
- if (password != 1234)
- {
- cout << "You've entered the wrong password, try again!\n\n";
- system("pause");
- system("CLS");
- admin_login();
- }
- else
- {
- admin_interface();
- int choose;
- system("CLS");
- logo();
- cout << " Choose Option:";
- cout << " [1] Computation of Profit";
- cout << " [2] Receipt of Profit ";
- cout << " [3] Exit";
- cout << "======================================== ";
- cin >> choose;
- switch (choose)
- {
- case 1 :
- system("CLS");
- computation_profit();
- {
- cout<< "Enter Number of Entrance Tickets Sold(P350): ";
- cin >> numGTix;
- cout<< "Enter Number of Entrance Tickets with FOOD and DRINKS Sold(P450): ";
- cin >> numPTix;
- int gGuest= tixGuest*numGTix;
- int gPerformer= tixPerformer*numPTix;
- int gProfit = gPerformer+gGuest;
- cout << "Gross Profit = P" << gProfit
- cout << "Enter Total Items of Expenses: ";
- cin >> numExpenses;
- tExpenses = 0;
- cout << "Enter Amount and Item" << endl;
- for(int x = 0; x < numExpenses; x++)
- {
- cout << << x+1 << ": P";
- cin >> expenses[x];
- cin >> descExpense[x];
- tExpenses+=expenses[x];
- }
- cout << "Total Expenses = P" << tExpenses << endl << endl;
- tProfit= gProfit-tExpenses;
- cout << "Total Profit = P" << tProfit << endl;
- system("pause");
- admin_interface();
- break;
- }
- case 2 :
- system("CLS");
- receipt_profit();
- cout << "==============R E C E I P T=============";
- Sleep(1000);
- cout << "| List of Expenses|";
- for(int x = 0; x < numExpenses; x++)
- {
- Sleep(1000);
- cout << "" << descExpense[x] << " - "
- << "P" << expenses[x]
- << "|" << endl;
- }
- Sleep(1000);
- cout << "|\t\tTotal Expenses = P" << tExpenses << " |";
- Sleep(1000);
- cout << "|Total Profit = P" << tProfit << " |" << endl;
- cout << "========================================";
- system("pause");
- admin_interface();
- break;
- case 3 :
- system("CLS");
- logo();
- cout << "=========T H A N K Y O U !========\n\n";
- exit(0);
- }
- }
- }
- }
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement