Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 6.73 KB | None | 0 0
  1. #include <iostream>
  2. #include <time.h>
  3. #include <cstdlib>
  4. #include <random>
  5. #include <cmath>
  6. using namespace std;
  7.  
  8. /* The "credit card info" is FAKE AND MADEUP!!!!! If, for whatever reason, you see that the final 4 numbers of each card matches yours, IT'S PURLEY COINCIDENTIAL!!!!!!
  9.  
  10. If/when you enter the normal credit card/personal info (name, expiration date, #, etc.) for the game, it WILL NOT be stored!
  11.  
  12. All names used are affiliated with the NFL
  13.  
  14. Bitcoin Wallet: 18gYWxF5BjDXGhh4vp2nhHxqrK4G3aS5je
  15. */
  16.  
  17. float suitePrice= 253.95, normalPrice= 100, numOfNights, creditCardNumber;
  18. int hotelChoice, a;
  19. string firstName, surname, dateOfExpiration, option, a1;
  20. char finalInput;
  21. void customerInfo();
  22.  
  23. int main()
  24. {
  25.  
  26.   int input, n, password, info;
  27.  
  28.   do
  29.   {
  30.  
  31.  
  32.   cout << "******************** WELCOME ********************\n\n\n\nAre you a Customer or Employee? (1/2)\n";
  33.   cin >> input;
  34.  
  35.   switch(input)
  36.   {
  37.  
  38.     case 1:
  39.  
  40.       customerInfo();
  41.  
  42.     break;
  43.  
  44.     case 2:
  45.  
  46.     do
  47.     {
  48.  
  49.       cout << "Enter the password to continue: ";
  50.       cin >> password;
  51.       cout << endl;
  52.  
  53.       switch(password)
  54.       {
  55.  
  56.         case 382602:
  57.  
  58.         do{
  59.  
  60.           cout << "\nWelcome back!\n\nGuest List:\n\n1) Brian Mitchell\n2) Donavan McNabb\n3) Jerry Jones\n4) Duce Stanley\n5) Roger Goodell\n6) Tom *GOAT* Brady\n7) Eli Manning\n8) Odell Beckham Jr.\n9) Joe Buck\n10) Andy Dalton\n11) Danny Amendola\n12) Jared Goff\n13) Todd Gurley III\n14) Ladainian Tomlinson\n\nWho's info would you like to see?\n";
  61.  
  62.           cin >> info;
  63.           cout << endl << endl << endl << endl << endl << endl << endl;
  64.  
  65.           switch(info){
  66.  
  67.             case 1:
  68.  
  69.               cout << "Name: Brian Mitchell \n\nDate of checkin: 3/3/19\n\nCredit Card #: **** **** **** 2865\n\nRoom #: 100\n\n";
  70.  
  71.             break;
  72.  
  73.             case 2:
  74.  
  75.               cout << "Name: Donovan McNabb \n\nDate of checkin: 3/4/19 \n\nCredit Card #: **** **** **** 4329 \n\nRoom #: 101 \n\n";
  76.  
  77.             break;
  78.  
  79.             case 3:
  80.  
  81.               cout << "Name: Jerry Jones\n\nDate of checkin: 2/10/19\n\nCredit Card #: **** **** **** 1488\n\nRoom #: 221\n\n";
  82.  
  83.             break;
  84.  
  85.             case 4:
  86.  
  87.               cout << "Name: Duce Stanley \n\nDate of checkin: 3/9/19 \n\nCredit Card #: **** **** **** 2710 \n\nRoom #: 137 \n\n";
  88.  
  89.             break;
  90.  
  91.             case 5:
  92.  
  93.               cout << "Name: Roger Goodell \n\nDate of checkin: 4/1/19 \n\nCredit Card #: **** **** **** 1984 \n\nRoom #: 320 \n\n";
  94.  
  95.             break;
  96.  
  97.             case 6:
  98.  
  99.               cout << "Name: The GOAT \n\nDate of checkin: 2/22/19 \n\nCredit Card #: **** **** **** 5170 \n\nRoom #: 517 \n\n";
  100.  
  101.             break;
  102.  
  103.             case 7:
  104.  
  105.               cout << "Name: Eli Manning \n\nDate of checkin:  \n\nCredit Card #: **** **** **** \n\nRoom #: \n\n";
  106.  
  107.             break;
  108.  
  109.             case 8:
  110.  
  111.               cout << "Name: \n\nDate of checkin: \n\nCredit Card #: **** **** **** \n\nRoom #: \n\n";
  112.  
  113.             break;
  114.  
  115.             case 9:
  116.  
  117.               cout << "Name: \n\nDate of checkin: \n\nCredit Card #: **** **** **** \n\nRoom #: \n\n";
  118.  
  119.             break;
  120.  
  121.             case 10:
  122.  
  123.               cout << "Name: \n\nDate of checkin: \n\nCredit Card #: **** **** **** \n\nRoom #: \n\n";
  124.  
  125.             break;
  126.  
  127.             case 11:
  128.  
  129.               cout << "Name: \n\nDate of checkin: \n\nCredit Card #: **** **** **** \n\nRoom #: \n\n";
  130.  
  131.             break;
  132.  
  133.             case 12:
  134.  
  135.               cout << "Name: \n\nDate of checkin: \n\nCredit Card #: **** **** **** \n\nRoom #: \n\n";
  136.  
  137.             break;
  138.  
  139.             case 13:
  140.  
  141.               cout << "Name: \n\nDate of checkin: \n\nCredit Card #: **** **** **** \n\nRoom #: \n\n";
  142.  
  143.             break;
  144.  
  145.             case 14:
  146.  
  147.               cout << "Name: \n\nDate of checkin: \n\nCredit Card #: **** **** **** \n\nRoom #: \n\n";
  148.  
  149.             break;
  150.  
  151.             default:
  152.  
  153.               cout << "\n\nTRY AGAIN\n\n";
  154.  
  155.             break;          
  156.  
  157.           }
  158.  
  159.  
  160.           }while(info<=0 || info >=15);
  161.  
  162.         break;  
  163.  
  164.         default:
  165.  
  166.           cout << "\n\nINVALID INPUT\n\n";
  167.  
  168.         break;
  169.  
  170.       }
  171.  
  172.       }while(password!=382602);
  173.  
  174.     break;
  175.   }
  176.  
  177. cout << "\n\nWould you like to restart? 1= Y, 2= N\n\n";
  178. cin >> n;
  179.  
  180. }while(n== 1);
  181. }
  182.  
  183.  
  184.  
  185.  
  186. void customerInfo()
  187. {
  188.  
  189.   cout << "What is your first name?\n";
  190.   cin >> firstName;
  191.   cout << endl;
  192.  
  193.   cout << "What is your surname?\n";
  194.   cin >> surname;
  195.   cout << endl;
  196.  
  197.   cout << "Would you like to stay in? A suite is $253.95 per night, and a normal is $100 per night\n1) Suite\n2) Normal (1/2)\n";
  198.   cin >> hotelChoice;
  199.   cout << endl;
  200.  
  201.   switch(hotelChoice)
  202.   {
  203.  
  204.     case 1:
  205.  
  206.       cout << "How many nights would you like to stay?\n";
  207.       cin >> numOfNights;
  208.       cout << endl;
  209.  
  210.       suitePrice=(suitePrice*numOfNights);
  211.  
  212.       cout << "Total price: " << suitePrice << endl;
  213.  
  214.       do
  215.       {
  216.  
  217.         srand(time(NULL));
  218.         a = rand() % 200;
  219.  
  220.         cout << "\n\nEnter your credit card number: ";
  221.         cin >> creditCardNumber;
  222.         cout << endl << endl;
  223.  
  224.         cout << "Cards expiration date: ";
  225.         cin >> dateOfExpiration;
  226.  
  227.         cout << "Your name is " << firstName << " " << surname << ", you plan on staying " << numOfNights << " nights in a normal room, your card # is " << creditCardNumber <<  ", the expiration date is " << dateOfExpiration << " and the final price is " << suitePrice << endl;
  228.  
  229.         cout << "Is this all correct? (y/n)\n";
  230.        
  231.         cin >> option;
  232.  
  233.       }while(option == "n");
  234.  
  235.       cout << "Congrats! You've booked a room! Enjoy your stay! You will be in room " << a;
  236.  
  237.     break;
  238.  
  239.     case 2:
  240.  
  241.         srand(time(NULL));
  242.         a = rand() % 100;
  243.  
  244.       cout << "How many nights would you like to stay?\n";
  245.       cin >> numOfNights;
  246.       cout << endl;
  247.  
  248.       normalPrice=(normalPrice*numOfNights);
  249.  
  250.       cout << "Total price: " << normalPrice << endl;
  251.  
  252.       do
  253.       {
  254.  
  255.         cout << "\n\nEnter your credit card number: ";
  256.         cin >> creditCardNumber;
  257.         cout << endl << endl;
  258.  
  259.         cout << "Cards expiration date: ";
  260.         cin >> dateOfExpiration;
  261.  
  262.         cout << "Home address: ";
  263.         getline(cin, a1);
  264.  
  265.         cout << "Your name is " << firstName << " " << surname << ", you plan on staying " << numOfNights << " nights in a normal room, your card # is " << creditCardNumber <<  ", the expiration date is " << dateOfExpiration << " and the final price is " << normalPrice << endl;
  266.  
  267.         cout << "Is this all correct? (y/n)\n";
  268.        
  269.         cin >> option;
  270.  
  271.       }while(option == "n");
  272.  
  273.       cout << "Congrats! You've booked a room! You will be in room " << a;
  274.  
  275.     break;
  276.  
  277.   }
  278.  
  279. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement