Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 imbibing at the Monastery: (3)
As of 2014-09-18 05:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (108 votes), past polls