Here's my code:
#include <iostream>
using namespace std;
const int SENIOR_PRICE = 9;
const int ADULT_PRICE = 12;
const float CHILD_PRICE = 6.95;
const float TAX_RATE = .06;
int main()
{
string name;
string address;
int numSeniorTickets;
int numAdultTickets;
int numChildTickets;
cout << "Enter customer name:" << endl;
cin >> name;
cout << "Enter customer address:" << endl;
cin >> address;
cout << "How many senior season tickets?" << endl;
cin >> numSeniorTickets;
cout << "How many adult tickets?" << endl;
cin >> numAdultTickets;
cout << "How many child tickets?" << endl;
cin >> numChildTickets;
return 0;
}
After the user enters their name, they are then prompted to enter their address. But before they can enter their address it also prompts for the number of senior season tickets. Why is it skipping a line of input? Here's what happens:
Enter customer name:
Daniel Benson
Enter customer address:
How many senior season tickets?
5
How many adult tickets?
5
How many child tickets?
5