summaryrefslogtreecommitdiff
path: root/sum
blob: acfa56301a632ffde9b815d205e4fb46fc1314b8 (plain)
1
2
3
4
5
6
7
8
9
#!/usr/bin/env ruby

sum = 0.0
while line = STDIN.gets
  sum += line.to_f
end

puts sum