subject

Write a program that can be used to assign seats for a commercial airplane. The airplane has 13 rows, with six seats in each row. Rows 1 and 2 are first class, rows 3 through 7 are business class, and rows 8 through 13 are economy class. Your program must prompt the user to enter the following information:a. Ticket type (first class, business class, or economy class)b. Desired seatSo far the code I have is ... now can I go about finishing to retreive the user input ? (This is for C++)#include #include using namespace std;int main(){ int r, c; char seat_resvr; char tic_type; char availability[13][6], reserved[2]; int row_num, col_num; char seats; cout << "A program that lets you choose your seating arrangement on an airplane"; cout << endl; char A[13][6]; for (int r = 0; r < 13; r++) { for (int c = 0; c < 6; c++) A[r][c] = '*'; } /*int row, seat; cin >> row >> seat; A[row - 1][seat - 1] = 'X';*/ cout << " A B C D E F" << endl; for (int r = 0; r < 13; r++) { cout << "Row" << setw(3) << r + 1 << " "; for (int c = 0; c < 6; c++) cout << A[r][c] << ' '; cout << endl; } cout << endl << "* -- available seat" << endl << "X -- occupied seat" << endl << endl << "Rows 1 and 2 are for first class passengers." << endl << "Rows 3 through 7 are for business class passengers." << endl << "Rows 8 through 13 are for economy class passengers." << endl; cout << "To reserve a seat enter Y/y (Yes), N/n(No):" << endl; cin >> seat_resvr; reserved[2] = 'X'; return 0 }

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:00
You turn your computer on and the computer will not boot up where is something you should do to diagnose the problem?
Answers: 1
question
Computers and Technology, 22.06.2019 22:40
Write a program that defines symbolic names for several string literals (chars between quotes). * use each symbolic name in a variable definition. * use of symbolic to compose the assembly code instruction set can perform vara = (vara - varb) + (varc - vard); ensure that variable is in unsigned integer data type. * you should also further enhance your symbolic logic block to to perform expression by introducing addition substitution rule. vara = (vara+varb) - (varc+vard). required: debug the disassembly code and note down the address and memory information.
Answers: 3
question
Computers and Technology, 25.06.2019 08:00
Aresearcher wants to do a web-based survey of college students to collect information about their sexual behavior and drug use. direct identifiers will not be collected; however, ip addresses may be present in the data set. risk of harm should be evaluated by: solely by the magnitude or severity of expected harm. both the magnitude (or severity) and the probability (or likelihood) of harm. solely by the probability of expected harm. neither the magnitude or probability of harm.
Answers: 3
question
Computers and Technology, 25.06.2019 08:10
Which of the following statements is false? a. package access is rarely used. b. use the access modifier package to give a method or variable package access. c. classes in the same source file are part of the same package. d. if a program uses multiple classes from the same package, these classes can access each other's package access members directly through references to objects of the appropriate classes, or in the case of static members, through the class name.
Answers: 1
You know the right answer?
Write a program that can be used to assign seats for a commercial airplane. The airplane has 13 rows...
Questions
question
SAT, 07.04.2020 10:43
question
Health, 07.04.2020 10:46
question
Business, 07.04.2020 10:46
Questions on the website: 13722363