Code:
#include <conio.h>
#include <stdio.h>
#include <ctype.h>
main()
{
char a[8][2]={"A","A","A","A","A","A","A","A"},b[8][2]={"B","B","B","B","B","B","B","B"},c[8][2]={"C","C","C","C","C","C","C","C"},d[8][2]={"D","D","D","D","D","D","D","D",};
char y;
int x;
do{
clrscr();
printf("\n1\t%s\t%s\t%s\t%s\n\n",a[1],b[1],c[1],d[1]);
printf("2\t%s\t%s\t%s\t%s\n\n",a[2],b[2],c[2],d[2]);
printf("3\t%s\t%s\t%s\t%s\n\n",a[3],b[3],c[3],d[3]);
printf("4\t%s\t%s\t%s\t%s\n\n",a[4],b[4],c[4],d[4]);
printf("5\t%s\t%s\t%s\t%s\n\n",a[5],b[5],c[5],d[5]);
printf("6\t%s\t%s\t%s\t%s\n\n",a[6],b[6],c[6],d[6]);
printf("7\t%s\t%s\t%s\t%s\n\n",a[7],b[7],c[7],d[7]);
do{
gotoxy(1,17);
clreol();
printf("Column Number (1-7) : ");
scanf("%d",&x);
}while(x!=1&&x!=2&&x!=3&&x!=4&&x!=5&&x!=6&&x!=7);
do{
gotoxy(1,18);
clreol();
printf("Enter Column Letter : ");
scanf("%s",&y);
y=toupper(y);
}while(y!='A'&&y!='B'&&y!='C'&&y!='D');
if(y=='A')
{
if(a[x][0]=='X')
printf("Sorry, the seat is already Reserved. Please select another.");
a[x][0]='X';
}
if(y=='B')
{
if(b[x][0]=='X')
printf("Sorry, the seat is already Reserved. Please select another.");
b[x][0]='X';
}
if(y=='C')
{
if(c[x][0]=='X')
printf("Sorry, the seat is already Reserved. Please select another.");
c[x][0]='X';
}
if(y=='D')
{
if(d[x][0]=='X')
printf("Sorry, the seat is already Reserved. Please select another.");
d[x][0]='X';
}
getch();}while(x!=100);
}