sub round { my $temp=$_[0]; my $rounded=0; while ($temp>.5) { $temp--; $rounded++; } return $rounded; } print &round(23.9);
In reply to Re: Rounding without int() or printf()
by BrotherAde
in thread Rounding without int() or printf()
by Mandor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |