Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: how to make perl only print whole numbers

by rowdog (Curate)
on Aug 04, 2010 at 10:38 UTC ( #852849=note: print w/ replies, xml ) Need Help??


in reply to Re: how to make perl only print whole numbers
in thread how to make perl only print whole numbers

Update: nevermind, sigh.

Just to be boldly pedantic...

You can divide every number by 2 (or by any number other than zero or one), you just won't always get an integer result.


Comment on Re^2: how to make perl only print whole numbers
Re^3: how to make perl only print whole numbers
by SuicideJunkie (Priest) on Aug 04, 2010 at 13:43 UTC

    Every number includes 1.5, and 1.5 / 1 does not give an integer result.

    The OP code even allows you to enter such numbers, since the input has no validation at all.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2015-05-29 03:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (574 votes), past polls