in reply to finding the correct integer
The "%f" format does rounding to the specified precision. In this case use:
print sprintf("%4.0f\n", 0.6505 / 0.0001);
OUTPUT:
6505
Bill
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: finding the correct integer
by LanX (Saint) on Nov 30, 2020 at 18:20 UTC | |
by Anonymous Monk on Nov 30, 2020 at 19:41 UTC | |
by Anonymous Monk on Dec 01, 2020 at 15:05 UTC | |
Re^2: finding the correct integer
by LanX (Saint) on Nov 30, 2020 at 22:10 UTC |
In Section
Seekers of Perl Wisdom