odd and even numbers

Alex Tweedly alex at tweedly.net
Mon Aug 5 18:39:49 EDT 2013


Can you please define the problem more precisely ?

It seems to me there are 3 possible answers to come out from any 
solution (or maybe more)

1 --> odd
2 --> even
2.5 --> neither odd nor even (or, if you prefer, "not whole")

AFAICS, all the proposed solutions so far have been incomplete, because 
they failed to produce "neither" (i.e. they tested for evenness, so if 
not even then you'd have to assume it was odd).

Perhaps the question should be re-stated as
    How do you test a whole number to see if it is even or odd?
in which case the earlier solutions would be good.

-- Alex.

On 05/08/2013 21:17, william humphrey wrote:
> How do you test a number to see if it is a whole odd or even number?
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list