Advertisement
Guest User

Untitled

a guest
Jan 28th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.06 KB | None | 0 0
  1.  
  2. int main()
  3. {
  4. system("color a");
  5. int choose;
  6.  
  7. logo();
  8. cout << " Choose Option:";
  9. cout << "[1] Customer";
  10. cout << " [2] Admin";
  11. cin >> choose;
  12.  
  13. switch (choose)
  14. {
  15. case 1 :
  16. system("CLS");
  17. customer_interface();
  18. int customer_interface()
  19. {
  20. int choose;
  21.  
  22. logo();
  23. cout << " Choose Option:";
  24. cout << " [1] Buy Ticket/s";
  25. cout << " [2] Back";
  26. cout << " [3] Exit";
  27.  
  28. cin >> choose;
  29.  
  30. switch (choose)
  31. {
  32. case 1 :
  33. system("CLS");
  34. register_customer();
  35. break;
  36.  
  37. case 2 :
  38. system("CLS");
  39. main();
  40. break;
  41.  
  42. case 3 :
  43. system("CLS");
  44. logo();
  45. cout << "=========T H A N K Y O U !========";
  46. exit(0);
  47. }
  48. }
  49. break;
  50.  
  51. case 2 :
  52. int admin_login()
  53. {
  54. system("CLS");
  55.  
  56. string username = "Admin";
  57. int password = 1234;
  58. logo();
  59.  
  60. cout << "Enter Username: ";
  61. cin >> username;
  62. if (username != "Admin")
  63. {
  64. cout << "You've entered the wrong username, try again!\n\n";
  65. system("pause");
  66. system("CLS");
  67. admin_login();
  68. }
  69. cout << "Enter Password: ";
  70. cin >> password;
  71. if (password != 1234)
  72. {
  73. cout << "You've entered the wrong password, try again!\n\n";
  74. system("pause");
  75. system("CLS");
  76. admin_login();
  77. }
  78. else
  79. {
  80. admin_interface();
  81. int choose;
  82. system("CLS");
  83. logo();
  84. cout << " Choose Option:";
  85. cout << " [1] Computation of Profit";
  86. cout << " [2] Receipt of Profit ";
  87. cout << " [3] Exit";
  88. cout << "======================================== ";
  89. cin >> choose;
  90.  
  91. switch (choose)
  92. {
  93. case 1 :
  94. system("CLS");
  95. computation_profit();
  96. {
  97. cout<< "Enter Number of Entrance Tickets Sold(P350): ";
  98. cin >> numGTix;
  99. cout<< "Enter Number of Entrance Tickets with FOOD and DRINKS Sold(P450): ";
  100. cin >> numPTix;
  101. int gGuest= tixGuest*numGTix;
  102. int gPerformer= tixPerformer*numPTix;
  103. int gProfit = gPerformer+gGuest;
  104. cout << "Gross Profit = P" << gProfit
  105. cout << "Enter Total Items of Expenses: ";
  106. cin >> numExpenses;
  107.  
  108. tExpenses = 0;
  109. cout << "Enter Amount and Item" << endl;
  110. for(int x = 0; x < numExpenses; x++)
  111. {
  112. cout << << x+1 << ": P";
  113. cin >> expenses[x];
  114. cin >> descExpense[x];
  115. tExpenses+=expenses[x];
  116. }
  117. cout << "Total Expenses = P" << tExpenses << endl << endl;
  118.  
  119. tProfit= gProfit-tExpenses;
  120.  
  121. cout << "Total Profit = P" << tProfit << endl;
  122. system("pause");
  123. admin_interface();
  124. break;
  125. }
  126.  
  127.  
  128. case 2 :
  129. system("CLS");
  130. receipt_profit();
  131. cout << "==============R E C E I P T=============";
  132. Sleep(1000);
  133. cout << "| List of Expenses|";
  134. for(int x = 0; x < numExpenses; x++)
  135. {
  136. Sleep(1000);
  137. cout << "" << descExpense[x] << " - "
  138. << "P" << expenses[x]
  139. << "|" << endl;
  140. }
  141. Sleep(1000);
  142. cout << "|\t\tTotal Expenses = P" << tExpenses << " |";
  143. Sleep(1000);
  144. cout << "|Total Profit = P" << tProfit << " |" << endl;
  145. cout << "========================================";
  146. system("pause");
  147. admin_interface();
  148. break;
  149.  
  150. case 3 :
  151. system("CLS");
  152. logo();
  153. cout << "=========T H A N K Y O U !========\n\n";
  154. exit(0);
  155. }
  156. }
  157. }
  158. }
  159. break;
  160. }
  161. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement