cout << "Purchase a Ticket\n\n";
do
{
cout << "Please select the row you would like to sit in: ";
cin >> row2;
cout << "Please select the seat you would like to sit in: ";
cin >> column2;
row2--;
column2--;
if (map [row2] [column2] == '*')
{
cout << endl;
cout << "Sorry that seat is sold-out, Please select a new seat.";
cout << endl << endl;
}
else
{
cost = price [row2] + 0;
total = total + cost;
cout << endl;
cout << "That ticket costs: $" << cost << endl;
cout << "Confirm Purchase? Enter (1 = YES / 2 = NO): ";
cin >> answer;
seat = seat - answer;
seat2 += answer;
cout << endl;
if (answer == 1)
{
cout << "Your ticket purchase has been confirmed." << endl << endl;
map [row2][column2] = FULL;
}
else if (answer == 2)
{
cout << endl;
cout << "Would you like to look at another seat? (1 = YES / 2 = NO)";
cout << endl << endl;
cin >> Quit;
}
cout << endl;
cout << "Would you like to look at another seat?(1 = YES / 2 = NO)";
cin >> Quit;
}
}
while (Quit == 1);
break;
I need it not to accept rows under 1 or over 5 and
seats under 1 or over 10
if (row2 < 1 || row2 >5) cout << "Please choose a row between (1-5) << endl;
I'm kinda lost of how to finish it of where to put it...

New Topic/Question
Reply




MultiQuote





|