#include "iostream" using namespace std; bool O; bool X; int i; int j; int seattype; bool Cinema[20][15] = { O,O,O,O,O,O,O,O,X,X,O,O,O,O,X, O,O,O,O,O,O,X,X,X,X,X,O,X,X,O, X,O,X,O,X,X,X,O,X,O,X,O,X,X,X, O,O,O,O,X,O,X,O,X,O,O,O,O,X,O, O,O,O,O,O,X,X,X,X,X,O,O,O,O,O, O,X,X,X,X,X,O,O,O,O,O,O,X,X,X, O,O,O,O,O,O,O,O,O,O,O,O,X,O,O, O,O,O,O,O,O,O,O,O,O,O,O,O,O,O, // 1 $3 O,O,X,O,X,O,X,O,O,O,X,X,X,X,X, X,X,X,X,X,X,X,O,O,O,X,X,X,X,X, X,X,X,X,X,X,X,X,X,X,X,X,X,X,X, O,O,X,O,O,X,O,O,O,O,O,X,X,O,X, X,X,X,O,O,X,O,O,O,O,O,O,O,O,O, O,O,O,O,O,O,O,O,O,O,O,O,O,O,O, O,O,O,O,O,O,O,O,O,X,O,O,O,O,O, //2 $4 O,O,X,X,X,X,X,X,O,O,O,O,O,X,O, O,O,O,O,O,O,O,O,X,X,O,X,X,X,X, O,X,O,O,O,O,X,X,X,X,X,X,X,O,O, O,O,O,O,O,O,O,X,X,O,O,O,O,O,O, O,O,O,O,O,X,X,X,X,X,X,O,X,O,O}; // 3 $5 /* int price() { cout<<" Please Enter what you would like to do"<> seattype; while(seattype =! 0) { if(seattype == 1) { //Insert Function here } if(seattype == 2) { //Insert Function here } if(seattype == 3) { //Insert Function here } if(seattype == 4) { //Insert Function here } else { cout <<"****** ERROR NO SUCH SEAT TYPE ********"<> seattype; } } return 0; } */ int ShowEmptySpaces() { int counterO = 0; int i; for(i=0;i<=299;i++) { if(i==X) { break; } else { counterO++; } cout <<"The amount of Empty spaces is"<> introw; cout <<" Enter the Seat of the column you would like to check"; int counter = 0; int seat; for(j=0; j<20; j++) { //Read The Array Ka8eta if(Cinema[i][j] == introw){ //If J = Introw then... cout <<"Enter the Seat you would like to book"; cin >> seat; } for(i=0; i<15; i++) { // Read the Horizontal Array... And.... if(Cinema[i][j] == seat) { // If I=seat then... for(i=0; i<15; i++) { // Read the Horizontal Array again if(Cinema[i][j] == X) { //If Cinema[i] is Marked as X DO... cout <<" That seat is taken please select another seat"; } else { //Or else if(Cinema[i][j] == O) { //Check if the spot is Marked O or Exmpty cout <<" That seat will be booked"; } Cinema[i][j]= X; } } } } } }