summaryrefslogtreecommitdiff
path: root/round
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-01-29 19:14:08 +0100
committerPatrick Simianer <p@simianer.de>2014-01-29 19:14:08 +0100
commit68acbb9a0c7967cb90a7e3756fc94fdd8a73d154 (patch)
tree3b445131dcb203e94473ae1d8aa82a1798585276 /round
parent49158e721bfaf6423dca9fc633873218f691c83a (diff)
make use of nlp_ruby, LICENSE
Diffstat (limited to 'round')
-rwxr-xr-xround6
1 files changed, 5 insertions, 1 deletions
diff --git a/round b/round
index 52cd013..3dfbb6f 100755
--- a/round
+++ b/round
@@ -1,4 +1,8 @@
#!/usr/bin/env ruby
-puts STDIN.gets.to_f.round ARGV[0].to_i
+
+r = ARGV[0].to_i
+while line = STDIN.gets
+ puts line.to_f.round r
+end