Hey, I'm wondering if anyone can help me, Im trying to create a simple cinema seating arrangement, where the x's are seats take and the o's are free. Problem is I cant seem to get the 0's to start where the X's finish. I'm new to java so what you see is the extent of my ability so far. Thanks for any help you can give at all!Here is what I haveso far;
import java.util.Scanner; public class Exercise4iv { public static void main (String[] args) { int seats, taken, available, i, k; seats = 50; taken = 28; available = seats-taken; i=0; k=0; while( i<=taken){ i++; System.out.print("\t X"); if(i%8==0 )System.out.println();} while( k<=available){ k++; System.out.print("\t O"); if(k%8==0) System.out.println();} }} Here is what i want it to look like for example
X X X X X X X X
X 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