Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Two O's, then four O's, then two O's again?

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?

Name: Anonymous 2014-11-15 8:30

>>20
You're the amateur here if you still mutate i's and j's in loops by hand. Go scrub some toilets if you like manual labor so much. Programming is not for you.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List