added halberTannenbaum
This commit is contained in:
@@ -2,6 +2,6 @@ package de.schleifen;
|
|||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
Schleifen.xEnZweiSchleife();
|
Schleifen.halberTannenbaum();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,13 +11,17 @@ public class Schleifen {
|
|||||||
|
|
||||||
for (int i=0; i<6; i++) {
|
for (int i=0; i<6; i++) {
|
||||||
for (int j=0; j<5; j++) {
|
for (int j=0; j<5; j++) {
|
||||||
System.out.print("xx");
|
System.out.println("xx");
|
||||||
}
|
}
|
||||||
System.out.print("\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void halberTannenbaum() {
|
public static void halberTannenbaum() {
|
||||||
|
String x = "x";
|
||||||
|
for (int i=0; i<13; i++) {
|
||||||
|
String y = x + "x";
|
||||||
|
System.out.println(x);
|
||||||
|
x = y;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user