Treppe hinzugefügt

This commit is contained in:
Joel Baldauf
2020-11-27 10:10:56 +01:00
parent 3502af836a
commit 0a35b374c5
5 changed files with 47 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
public class Treppe {
public static void main(String[] args) {
int h=5, b=3;
for (int i=1; i<=h; i++) {
String repeatedStars = "*".repeat(b);
System.out.printf("%"+b*h+"s\n",repeatedStars.repeat(i));
}
}
}