Question: I've been given this problem to work with: Write a C++ program with the following specifications: 1.Use two-dimensional array with size 7 columns and 5

I've been given this problem to work with:

Write a C++ program with the following specifications:

1.Use two-dimensional array with size 7 columns and 5 rows.

2.Seat numbers are populated during run-time.

3.User is asked to input a seat number.

4.Seat number chosen is replaced by 0.

5.Program displays a remark "Seat successfully reserved" when reservation is done.

6.User is not allowed to reserve a previously reserved seat.Display "Seat is taken" remarks.

7.User is not allowed to enter an invalid seat number.Display an error message.

8.Program continuously loops.

I am trying to accomplish this without using functions as I have not gotten to that point of the module yet.

This is the code I have so far: note that this is not complete, I'm still trying to develop a backbone that fulfills #2 and #8 before proceeding with the rest.

#include#include#include#include//#include"_pause.h"usingnamespacestd;////////////////////////////////////////////////////////////////////NOTE//Thisisyourprogramentrypoint.Yourmainlogicisplaced//insidethisfunction.Youmayaddyourfunctionsbeforethis//"main()",orafterthis"main()"providedyouaddedreference//beforethis"main()"function.//////////////////////////////////////////////////////////////////intmain(){intcount=1;intseat[5][7];intctr,ctr2;boolcont=true;charchoice[3];do{for(intctr=0;ctr>choice;if(choice=="Y"||choice=="YES"){cont=true;}else(cont==false);}while(cont=true);system("pause");return0;}

This is the output so far:

I've been given this problem to work with:Write a C++ program with

\f

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 Programming Questions!