There was an error while loading. Please reload this page.
1 parent cbf806a commit cfbad1fCopy full SHA for cfbad1f
src/Triangle.java
@@ -4,6 +4,28 @@
4
public class Triangle {
5
public static void main(String[] args) {
6
easiestExerciseEver();
7
+ drawHorizontalLine(8);
8
+ drawVerticalLine(3);
9
+ drawRightTriangle(3);
10
+ }
11
+
12
+ private static void drawRightTriangle(int size) {
13
+ for (int i = 0; i < size; i++) {
14
+ drawHorizontalLine(i+1);
15
16
17
18
+ private static void drawVerticalLine(int size) {
19
20
+ drawHorizontalLine(1);
21
22
23
24
+ private static void drawHorizontalLine(int size) {
25
26
+ System.out.print("*");
27
28
+ System.out.println();
29
}
30
31
private static void easiestExerciseEver() {
0 commit comments