You are viewing a single comment's thread. Return to all comments →
public static void staircase(int n) { // Write your code here String result = ""; for (int i=1; i<=n; i++) { for (int s=0; s<n-i; s++) result += " "; for (int j=n; j>n-i; j--) result += "#"; System.out.println(result); result = ""; } }
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 →