Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
Rounding up to 2 decimal places
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Walt Mankowski, post: 4750176"] Er, that doesn't work. Gary said he always wants it to round *up*. Your code rounds *down* and prints out 0.33. The trick I've always used in situations like this is to add 0.005 to it before passing it to printf. Walt [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
Rounding up to 2 decimal places
Top