回答編集履歴
1
修正
answer
CHANGED
@@ -8,9 +8,12 @@
|
|
8
8
|
|
9
9
|
# ここに三角形の面積を求めるメソッドを定義
|
10
10
|
def triangle_area(height,bottom)
|
11
|
-
height * bottom / 2
|
11
|
+
height * bottom / 2.0
|
12
12
|
end
|
13
13
|
# 結果を出力
|
14
14
|
-puts triangle_area
|
15
15
|
+puts triangle_area(height, bottom)
|
16
|
-
```
|
16
|
+
```
|
17
|
+
|
18
|
+
---
|
19
|
+
追記:tatsu99さんの指摘箇所を追加
|