Created
September 27, 2017 02:48
-
-
Save viveknarang/41cc5bfc09c79bc0257c5fe6dd2a6666 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NestedLoop { | |
public static void main (String [] args) { | |
int userNum = 0; | |
int i = 0; | |
int j = 0; | |
/* Your solution goes here */ | |
for (i = 0; i <= userNum; i++) { | |
for (j = 0; j < i; j++) { | |
System.out.print(" "); | |
} | |
System.out.println(i); | |
} | |
return; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment