Code:
#include <iostream>
#include <iomanip>
using namespace std;
int main ()
{
int ROWS = 9;
int ISLES = 10;
int counts[ROWS][ISLES] =
{
{ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 },
{ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 },
{ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 },
{ 10, 10, 20, 20, 20, 20, 20, 20, 10, 10 },
{ 10, 10, 20, 20, 20, 20, 20, 20, 10, 10 },
{ 10, 10, 20, 20, 20, 20, 20, 20, 10, 10 },
{ 20, 20, 30, 30, 40, 40, 30, 30, 20, 20 },
{ 20, 30, 30, 40, 50, 50, 40, 30, 30, 20 },
{ 30, 40, 50, 50, 50, 50, 50, 50, 40, 30 },
};
}
void getdata (const counts[][], int ROW, int ISLE, int pick)
{
cout<<"Press (1) if you would like to pick a seat and press (2) if you would like to enter a price: "<<endl;
cin>>pick;
if (pick == 1)
{
cout<<"Please enter the row you would like to sit in: "<<endl;
cin>>ROW;
cout<<"Please enter the isle you would like to sit in: "<<endl;
cin>>ISLE;
}
else if (pick ==2)
{
cout<<"Please enter the price: "<<endl;
cin>>price;
}
}