回答編集履歴
1
追記
answer
CHANGED
@@ -1,1 +1,9 @@
|
|
1
|
-
`temps.index(temps.min)`
|
1
|
+
`temps.index(temps.min)`
|
2
|
+
|
3
|
+
```
|
4
|
+
heights.each do |height| #全要素で平均気温との差を計算し、配列に収納
|
5
|
+
temps << ave_temp_difference(height)
|
6
|
+
end
|
7
|
+
```
|
8
|
+
は
|
9
|
+
`temps = heights.map{|height| ave_temp_difference(height) }`
|