Skip to content
Snippets Groups Projects
Commit a46119a4 authored by iliya.saroukha's avatar iliya.saroukha
Browse files

triangle

parent 57236a9a
No related branches found
No related tags found
No related merge requests found
public class Triangle {
public static void printTriangle(int n) {
for (int i = 0; i < n; i++) {
for (int j = 0; j <= i; j++) {
System.out.print("*");
}
System.out.println();
}
}
public static void main(final String[] args) {
printTriangle(4);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment