Answer:
public class MyClass {
public static void main(String args[]) {
for(int i =1; i<=5;i+=2){
for(char j ='A'; j<='D';j++){
System.out.print(i);
System.out.print(j+" ");
}
}
}
}
Step-by-step explanation:
This line iterates through 1 to 5 wit an increment of 2
for(int i =1; i<=5;i+=2){
This line iterates through alphabets A to E
for(char j ='A'; j<='D';j++){
This line prints the seat numbers (1, 3 and 5)
System.out.print(i);
This line prints the seat letters(A-E)
System.out.print(j+" ");
}
}