|
|
| Welcome to the Monastery | |
| PerlMonks |
Answer: How do I round up a number? |
| ( #87503=categorized answer: print w/ replies, xml ) | Need Help?? |
|
Q&A > math > How do I round up a number? contributed by Tiefling
My preferred answer if you insist on rounding up is the second one given by Anonymous Monk above. However, it's best to round to the nearest integer, in which case int($n+0.5) is your friend.
Tiefling
|
|
||||||||||||||||||||