回答編集履歴

1

別解の追加

2020/09/26 08:16

投稿

kazuma-s
kazuma-s

スコア8224

test CHANGED
@@ -11,3 +11,23 @@
11
11
  }
12
12
 
13
13
  ```
14
+
15
+ 別解
16
+
17
+ ```Java
18
+
19
+ public static void printStar(int numberRowColumn){
20
+
21
+ char[] a = new char[numberRowColumn];
22
+
23
+ java.util.Arrays.fill(a, '*');
24
+
25
+ for (int i = 0; i < numberRowColumn; i++) {
26
+
27
+ a[i] = '0'; System.out.println(a); a[i] = '*';
28
+
29
+ }
30
+
31
+ }
32
+
33
+ ```