diff options
Diffstat (limited to 'round')
-rwxr-xr-x | round | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |