View Single Post
  #4 (permalink)  
Old 11-12-2007, 10:12 AM
unhurt unhurt is offline
Member
 
Join Date: Oct 2007
Posts: 21
unhurt is on a distinguished road
erm, well i don't know about ur while loop is it necessary for ur assignment but i change it to for loop it works fine.... hope u don't mind the while and for though.... but this is what i got just put this as ur while loop


Code:
for (int i=0; i<squareSize; i++) { System.out.print("X"); } for (int i=1; i<squareSize-1; i++) { System.out.print("\nX"); for (int j=1; j<squareSize-1; j++) { System.out.print("-"); } System.out.print("X"); } if (squareSize != 1) { System.out.println(); for (int i=0; i<squareSize; i++) { System.out.print("X"); } }

Last edited by unhurt : 11-12-2007 at 10:24 AM.
Reply With Quote