Advertisement
Guest User

Untitled

a guest
Jun 25th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.70 KB | None | 0 0
  1. #include<string>
  2.  
  3. #include <iostream>
  4.  
  5. #include<vector>
  6.  
  7. using namespace std;
  8.  
  9.  
  10. int main()
  11.  
  12. {
  13.  
  14. //variables Cinema
  15.  
  16. float adult = 10.30;
  17.  
  18. float senior_citizen = 8.24;
  19.  
  20. float children = 5.15;
  21.  
  22. int tickets = 60;
  23.  
  24. int adults;
  25.  
  26. int childrens;
  27.  
  28. int seniors;
  29.  
  30. int booking ;
  31.  
  32. int left;
  33.  
  34. int count;
  35.  
  36. int num;
  37.  
  38. int userguide;
  39.  
  40. //movie names
  41.  
  42. string d = "DeadPool";
  43.  
  44. string g = "Goosebumps";
  45.  
  46. //welcome message
  47.  
  48.  
  49.  
  50.  
  51.  
  52. string A;
  53.  
  54. cout << "Hi, what's your staff name" << endl;
  55.  
  56. cin >> A;
  57.  
  58. cout << A << " welcome to this Cinema " << endl;
  59.  
  60. cout << "Please type 1 to reserve DeadPool on 01/01/2018"<< endl;
  61.  
  62. cout << "Please type 2 to reserve DeadPool on 05/01/2018"<< endl;
  63.  
  64. cout << "Please type 3 to reserve Goosebumps on 01/01/2018"<< endl;
  65.  
  66. cout << "Please type 4 to see the userguide"<< endl;
  67.  
  68. //start loop if 1 or 2
  69.  
  70. int choice;
  71.  
  72. cout: choice;
  73.  
  74. cin >> choice;
  75.  
  76. if (choice == 1)
  77.  
  78.  
  79.  
  80.  
  81.  
  82. {
  83.  
  84.  
  85.  
  86.  
  87.  
  88. cout << "You picked DeadPool on 01/01/2018" << endl;
  89.  
  90. cout<< "How many seats booked ?"<< endl;
  91.  
  92. int seats;
  93.  
  94. cin >> seats;
  95.  
  96. cout <<tickets - seats << "more seats available"<<endl;
  97.  
  98. booking = booking + seats ;
  99.  
  100.  
  101.  
  102. cout << "we have got three types of tickets" << endl;
  103.  
  104. cout << "How many adults in total, you would like to book for?" << endl;
  105.  
  106. cin >> adults;
  107.  
  108. cout << "How many childs in total, you would like to book for?" << endl;
  109.  
  110. cin >> childrens;
  111.  
  112. cout << "How many senior citizen in total, you would like to book for?" << endl;
  113.  
  114. cin >> seniors;
  115.  
  116. cout << "Total amount due £" << (adult * adults) + (children * childrens) + (senior_citizen * seniors) << endl;
  117.  
  118. booking = adults + childrens + seniors;
  119.  
  120. booking = booking + seats;
  121.  
  122. cout << "total bookings" << booking<<endl ;
  123.  
  124. }
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131. if (choice == 2)
  132.  
  133. {
  134.  
  135. cout << "You picked DeadPool on 05/01/2018" << endl;
  136.  
  137. cout<< "How many seats booked ?"<< endl;
  138.  
  139. int seats;
  140.  
  141. cin >> seats;
  142.  
  143. cout <<tickets - seats << "more seats available"<<endl;
  144.  
  145. booking = booking + seats ;
  146.  
  147.  
  148.  
  149. cout << "we have got three types of tickets" << endl;
  150.  
  151. cout << "How many adults in total, you would like to book for?" << endl;
  152.  
  153. cin >> adults;
  154.  
  155. cout << "How many childs in total, you would like to book for?" << endl;
  156.  
  157. cin >> childrens;
  158.  
  159. cout << "How many senior citizen in total, you would like to book for?" << endl;
  160.  
  161. cin >> seniors;
  162.  
  163. cout << "Total amount due £" << (adult * adults) + (children * childrens) + (senior_citizen * seniors) << endl;
  164.  
  165. booking = adults + childrens + seniors;
  166.  
  167. booking = booking + seats;
  168.  
  169. cout << "total bookings" << booking<<endl ;
  170.  
  171. }
  172.  
  173. if (choice == 3)
  174.  
  175. {
  176.  
  177. cout << "You picked Goosebumps on 01/01/2018" << endl;
  178.  
  179. cout<< "How many seats booked ?"<< endl;
  180.  
  181. int seats;
  182.  
  183. cin >> seats;
  184.  
  185. cout <<tickets - seats << "more seats available"<<endl;
  186.  
  187. booking = booking + seats ;
  188.  
  189.  
  190.  
  191. cout << "we have got three types of tickets" << endl;
  192.  
  193. cout << "How many adults in total, you would like to book for?" << endl;
  194.  
  195. cin >> adults;
  196.  
  197. cout << "How many childs in total, you would like to book for?" << endl;
  198.  
  199. cin >> childrens;
  200.  
  201. cout << "How many senior citizen in total, you would like to book for?" << endl;
  202.  
  203. cin >> seniors;
  204. }
  205. if (choice == 4 ){
  206.  
  207.  
  208. cout<<"\n=>The user have to enter their name and staff ID to proceed\n"
  209. <<"\n=>The user have to select a movie and number of tickets\n"
  210. <<"\n=>The user can maximum buy 10 tcikets at a time\n"
  211. <<"\n=>Your bill and total sale of the day ";
  212. cin>>userguide;
  213. }
  214.  
  215. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement