fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. const int SENIOR_PRICE = 9;
  6. const int ADULT_PRICE = 12;
  7. const float CHILD_PRICE = 6.95;
  8. const float TAX_RATE = .06;
  9.  
  10. int main()
  11. {
  12. string name;
  13. string address;
  14. int numSeniorTickets;
  15. int numAdultTickets;
  16. int numChildTickets;
  17.  
  18. cout << "Enter customer name:" << endl;
  19. cin >> name;
  20. cout<<name<<"\n";
  21.  
  22.  
  23. cout << "Enter customer address:" << endl;
  24. cin >> address;
  25. cout<<address<<"\n";
  26.  
  27.  
  28. cout << "How many senior season tickets?" << endl;
  29. cin >> numSeniorTickets;
  30.  
  31. cout << "How many adult tickets?" << endl;
  32. cin >> numAdultTickets;
  33.  
  34. cout << "How many child tickets?" << endl;
  35. cin >> numChildTickets;
  36.  
  37. return 0;
  38. }
  39.  
Success #stdin #stdout 0s 3472KB
stdin
Daniel Benson
5
5
5
stdout
Enter customer name:
Daniel
Enter customer address:
Benson
How many senior season tickets?
How many adult tickets?
How many child tickets?