summaryrefslogtreecommitdiff
path: root/mult
diff options
context:
space:
mode:
Diffstat (limited to 'mult')
-rwxr-xr-xmult6
1 files changed, 5 insertions, 1 deletions
diff --git a/mult b/mult
index eaead89..2ef0149 100755
--- a/mult
+++ b/mult
@@ -1,4 +1,8 @@
#!/usr/bin/env ruby
-puts STDIN.gets.to_f * ARGV[0].to_f
+
+factor = ARGV[0].to_f
+while line = STDIN.gets
+ puts line.to_f * factor
+end