class test{//class
public static void main(String[]args)
{
String booking [][]= new String [30] [6] ;//two dimensional array
System.out.println("Enter the seat column you want");//column entry
char column=Keyboard.readChar();
System.out.println("Enter the seat row you want");//row entry
int row=Keyboard.readInt();
System.out.println("Enter your name");//name entry
String name=Keyboard.readString();
if(column=='a' || column =='A')
{
column='0';
}
else if(column=='b' || column=='B')
{
column='1';
}
else if(column=='c' || column=='C')
{
column='2';
}
else if(column=='d' || column=='D')
{
column='3';
}
else if(column=='e' || column=='E')
{
column='4';
}
else if(column=='f' || column=='F')
{
column='5';
}
System.out.println( name + " your seat is column " + column + " seat " +row);
booking[column][row] = name;//put name into chosen index
for(int i = 0; i < booking.length; i++)
{
for(int x = 0; x < booking[0].length; x++)
{
System.out.print(booking[i][x]+" ");
}
System.out.println();
}
}
}
/************************************************** ************
could anyone help me having trouble with it
cant get my in put to go in to the index
eooro.png