1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
char again = 'Y';
char seating [13][11] = {{'*','*','x','*','x','x'},
{'*','x','*','x','*','x'},
{'*','*','x','x','*','x'},
{'x','*','x','*','x','x'},
{'*','x','*','x','*','*'},
{'*','x','*','*','*','x'},
{'x','*','*','*','x','x'},
{'*','x','*','x','x','*'},
{'x','*','x','x','*','x'},
{'*','x','*','x','x','x'},
{'*','*','x','*','x','*'},
{'*','*','x','x','*','x'},
{'*','*','*','*','x','*'}};
while (again == 'y' || again == 'Y')
{
cout << "This is the seating chart. "<<endl;
cout << " * means seat is available, x means it is not. "<<endl;
cout << " ABCDEF "<<endl;
for (int rownum = 0; rownum < 13; rownum++)
{
for (int row =0; row <13; row++)
{
for (int column = 0; column < 11; column ++)
{
cout <<rownum<< seating[row][column];
}
}
cout<<endl;
}
cout << "Would you like to do more? "<<endl;
cin>>again;
}
return 0;
}
|