Help for this page

Select Code to Download


  1. or download this
      DB<1> print sprintf "%.2f", 10/3;
    3.33
    
  2. or download this
      DB<2> printf "%.2f", 10/3
    3.33
    
  3. or download this
    $ perl -e 'printf "%.2f\n", $_/20 for 1..10'
    0.05
    ...
    0.40
    0.45
    0.50
    
  4. or download this
    $ perl -e 'printf "%.1f\n", $_/20 for 1..10'
    0.1
    ...
    0.4
    0.5
    0.5