Name: Bob (Twin Peaks) 2014-11-14 2:58
This for loop prints: XOOOOXOOOOXOOOOXOOOO
for(int i=1;i<=4;i++){
System.out.print("X");
for(int j=1;j<=4;j++){
System.out.print("O");
}
}
Using ONLY "for" (no if, while, etc.), print statements, and modifying the logic of the loops, how can I make the loops print:
XOOXOOOOXOOOOXOO
Where the O's after the first and last X's are HALF the amount of O's printed between the inner X's?
for(int i=1;i<=4;i++){
System.out.print("X");
for(int j=1;j<=4;j++){
System.out.print("O");
}
}
Using ONLY "for" (no if, while, etc.), print statements, and modifying the logic of the loops, how can I make the loops print:
XOOXOOOOXOOOOXOO
Where the O's after the first and last X's are HALF the amount of O's printed between the inner X's?