We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d2723a commit 5094213Copy full SHA for 5094213
src/de/dhbwka/exercise/arrays/Pascal.java
@@ -13,7 +13,7 @@ public static void main(String[] args) {
13
final String FORMAT = "%" + MAX_LENGTH + "d";
14
15
for (int n = 0; n < depth; n++) {
16
- System.out.print(" ".repeat((depth - (n + 1)) * MAX_LENGTH/2));
+ System.out.print(new String(new char[(depth - (n + 1)) * MAX_LENGTH / 2]).replaceAll("\00", " "));
17
for (int k = 0; k < n + 1; k++) {
18
System.out.printf(FORMAT, binomialCoefficient(n, k));
19
}
0 commit comments