Advertisement
NAK

Ticket System

NAK
Apr 18th, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7.  {
  8.  
  9.      int choice= 0;
  10.  
  11.      while( choice != 4)
  12.      {
  13.          cout<<"What would you like to do?"<<endl;
  14.          cout<<"1. Buy Tickets."<<endl;
  15.          cout<<"2. Remove Tickets."<<endl;
  16.          cout<<"3. Print Receipt."<<endl;
  17.          cout<<"4. Exit."<<endl;
  18.          cout<<"Select (1, 2, 3, or 4)"<<endl;
  19.          cin>>choice;
  20.  
  21.          switch (choice)
  22.          {
  23.             case 1:
  24.                 cout<<"1. Do Buy Tickets"<<endl;
  25.                 break;
  26.             case 2:
  27.                 cout<<"2. Do Remove Tickets."<<endl;
  28.                 break;
  29.             case 3:
  30.                 cout<<"3. Print Receipt."<<endl;
  31.                 break;
  32.             case 4: // 4 Exit
  33.                 break;
  34.             default:
  35.                 break;
  36.          }
  37.     }
  38.     return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement