From 68acbb9a0c7967cb90a7e3756fc94fdd8a73d154 Mon Sep 17 00:00:00 2001 From: Patrick Simianer
Date: Wed, 29 Jan 2014 19:14:08 +0100 Subject: make use of nlp_ruby, LICENSE --- sum | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sum') diff --git a/sum b/sum index 3fca95e..dac72d3 100755 --- a/sum +++ b/sum @@ -1,8 +1,10 @@ #!/usr/bin/env ruby + sum = 0.0 while line = STDIN.gets - sum += line.strip.to_f + sum += line.to_f end + puts sum -- cgit v1.2.3