in reply to Re^2: Rounding
in thread Rounding
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re^2: Rounding
by fglock (Vicar) on Sep 23, 2002 at 14:11 UTC | |
|
Re^4: Rounding
by Aristotle (Chancellor) on Sep 23, 2002 at 17:06 UTC |