class Solution {
fun solution(arr: IntArray): Double {
var temp = 0
for (a in arr)
temp += a
var answer:Double = 0.0
// 나누기 할 때 하나만 double이어도 된다 ...
answer = temp / arr.size.toDouble()
return answer
}
}
toDouble()
toInt()
int.toString()
1) String.toInt()
var str: String = "12"
str.toInt()
2) Integer.parseInt(str)