回答編集履歴

2

コメントによりミス発覚

2018/08/04 12:34

投稿

swordone
swordone

スコア20669

test CHANGED
@@ -20,7 +20,7 @@
20
20
 
21
21
  .forEach(i -> {
22
22
 
23
- int kaijo = IntStream.rangeClosed(1, i)
23
+ double kaijo = IntStream.rangeClosed(1, i)
24
24
 
25
25
  .asDoubleStream()
26
26
 

1

エラー修正

2018/08/04 12:34

投稿

swordone
swordone

スコア20669

test CHANGED
@@ -18,12 +18,16 @@
18
18
 
19
19
  IntStream.rangeClosed(10, 14)
20
20
 
21
+ .forEach(i -> {
22
+
21
- .mapToDouble(i -> IntStream.rangeClosed(1, i)
23
+ int kaijo = IntStream.rangeClosed(1, i)
22
24
 
23
25
  .asDoubleStream()
24
26
 
25
- .reduce(1.0, (i1, i2) -> i1 * i2))
27
+ .reduce(1.0, (i1, i2) -> i1 * i2);
26
28
 
27
- .forEach(i -> System.out.println(i + "! = " + kaijo));
29
+ System.out.println(i + "! = " + kaijo);
30
+
31
+ });
28
32
 
29
33
  ```