Question: I need help in modifying my code. I'm on my final step already. I'm struggling with how to display the final output when the user

I need help in modifying my code. I'm on my final step already. I'm struggling with how to display the final output when the user is done choosing the tickets he or she has reserved and how do I add an exit option? Lastly Im having trouble to display when the user picked the wrong class and row.

#include #include #include #include using namespace std; int main(int argc, char *argv[]) { int airplane[13][6]; char airchar[13][6]; string ticket; int row[2]; char seat; //-------------------------------------------- for(int i = 0; i < 13; i++) { for(int j = 0; j < 6; j++) { airchar[i][j] = '*'; airplane[i][j] = 0; } } //-------------------------------------------- for(;;) { cout<<"MEGA AIRLINES!"<>ticket; cout<<"Desired Row: "; cin>>row[0]; cout<<"Enter Desired Seat (A,B,C,D,E or F): "; cin>>seat; switch(seat) { case 'A': case 'a': row[0] = row[0] - 1; row[1] = 1; row[1] = row[1] - 1; break; case 'B': case 'b': row[0] = row[0] - 1; row[1] = 2; row[1] = row[1] - 1; break; case 'C': case 'c': row[0] = row[0] - 1; row[1] = 3;

row[1] = row[1] - 1; break; case 'D': case 'd': row[0] = row[0] - 1; row[1] = 4; row[1] = row[1] - 1; break; case 'E': case 'e': row[0] = row[0] - 1; row[1] = 5; row[1] = row[1] - 1; break; case 'F': case 'f': row[0] = row[0] - 1; row[1] = 6; row[1] = row[1] - 1; break; } if(ticket == "FC") { if(row[0]+1 == 1 || row[0]+1 == 2) { if(airplane[row[0]][row[1]] == 0) { airplane[row[0]][row[1]] = 1; airchar[row[0]][row[1]] = 'X'; } else if(airplane[row[0]][row[1]] == 1) { cout<<"Message: Apologies but Seat "<

{ airplane[row[0]][row[1]] = 1; airchar[row[0]][row[1]] = 'X'; } else if(airplane[row[0]][row[1]] == 1) { cout<<"Message: Apologies but Seat "<

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!