Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribed
\f

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

Describe the contingency leadership theory variables.

Answered: 1 week ago

Question

Why we need follow a leadership with caring and commitment?

Answered: 1 week ago

Question

Can water pricing promote more efficient water use?

Answered: 1 week ago