You are viewing a single comment's thread. Return to all comments →
mine was pretty similar
public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); drawStairCase(n); } static void drawStairCase(int height){ for(int i = 0; i<height; i++){ for(int x = i+1; x < height; x++){ System.out.print(" "); } for(int x = height-(i+1); x < height; x++){ System.out.print("#"); } System.out.println(); } }
Seems like cookies are disabled on this browser, please enable them to open this website
Staircase
You are viewing a single comment's thread. Return to all comments →
mine was pretty similar