You might also want to take a look at floor and ceil$unrounded=0.66666; $rounded=sprintf("%.2f",$a) #$rounded is rounded to 2 decimal places + and is equal to 0.67 printf("$unrounded rounded to 3 decimal places is %.3f\n",$unrounded +);
|
|---|
| Replies are listed 'Best First'. |
|---|