Created
March 16, 2020 05:51
-
-
Save ufebri/36c814c137ba535e901e7ac6e82f12ff to your computer and use it in GitHub Desktop.
This file contains 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 PiramidCounter { | |
public static void main(String[] args) { | |
showPiramidCounter(10); | |
} | |
private static void showPiramidCounter(int n) { | |
for (int i = 1; i <= n; ++i) { | |
for (int o = 1; o <= i; ++o) { | |
System.out.print(o + " "); | |
} | |
System.out.println(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment