and got$r = 1.3; print $r,"\n"; $rounded=sprintf ("%.1f",$r+.05); print $rounded,"\n";
Did you miss a 0 after the decimal? or is there some other behaviour I a missing.perl -w round.pl 1.3 1.4
In reply to Re: Re^2: Rounding
by admiraln
in thread Rounding
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |