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

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