Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Using (s)printf()

by Anonymous Monk
on Aug 01, 2012 at 16:59 UTC ( [id://984833]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # To properly 'round a float as necessary':
    printf("%.0f", 3.49); # This will print 3
    printf("%.0f", 3.51); # This will print 4
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://984833]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-09-20 19:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (26 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.