RE: Determining Odd and Even Numbers

2004-08-05 Thread kamal.gupta
03, 2004 8:00 PM To: R. Kamal Raj Guptha (WT01 - TELECOM & INTER-NETWORKING SOLUTIONS); [EMAIL PROTECTED] Subject: RE: Determining Odd and Even Numbers From: <[EMAIL PROTECTED]> > Well, > > All the above said answers are perfectly fine, but just to make it > more efficient wha

Re: Re: Determining Odd and Even Numbers

2004-08-04 Thread Richard A. Evans
> The chosen examples struck me as funny. Movie Quiz time (probably just > for the americans): > > Ron: "Are you going to put in 220?" > Jack: "Yeh, 220 or 221 whatever it takes..." MR. MOM -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Determining Odd and Even Numbers

2004-08-03 Thread Jimstone77
Thanks everyone!

Re: Determining Odd and Even Numbers

2004-08-03 Thread Jeff 'japhy' Pinyan
On Aug 3, David Dorward said: >On 3 Aug 2004, at 13:26, [EMAIL PROTECTED] wrote: >> Does anyone know a simple way to determine if a number is odd or even? > >Use the modulus operator. If $foo % 2 has remainder 1, then it is odd, >if it has remainder 0, then it is even. While I find this a silly q

RE: Determining Odd and Even Numbers

2004-08-03 Thread Jenda Krynicky
From: <[EMAIL PROTECTED]> > Well, > > All the above said answers are perfectly fine, but just to make it > more efficient what we can do is, we can avoid the if statement or ?: > operator. > > This is because whenever we go for a decision statement, it takes some > extra processing time. Wheneve

RE: Determining Odd and Even Numbers

2004-08-03 Thread kamal.gupta
ED] Sent: Tuesday, August 03, 2004 6:24 PM To: [EMAIL PROTECTED] Subject: Re: Determining Odd and Even Numbers Thanks everyone! Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addre

OT: Re: Determining Odd and Even Numbers

2004-08-03 Thread Wiggins d Anconia
> > > > Does anyone know a simple way to determine if a number is odd or even? For > example 220 would come out even while 221 would come out as an odd number. > > The chosen examples struck me as funny. Movie Quiz time (probably just for the americans): Ron: "Are you going to put in 220?

Re: Determining Odd and Even Numbers

2004-08-03 Thread Harald Richard Ashburner
[EMAIL PROTECTED] said: > > >Does anyone know a simple way to determine if a number is odd or even? For >example 220 would come out even while 221 would come out as an odd number. perl -e '($number % 2)?print "even":print "odd"; print "\n";' % is the modulus operator, and returns the remainder

Re: Determining Odd and Even Numbers

2004-08-03 Thread David Dorward
On 3 Aug 2004, at 13:26, [EMAIL PROTECTED] wrote: Does anyone know a simple way to determine if a number is odd or even? Use the modulus operator. If $foo % 2 has remainder 1, then it is odd, if it has remainder 0, then it is even. -- David Dorward

Determining Odd and Even Numbers

2004-08-03 Thread Jimstone77
Does anyone know a simple way to determine if a number is odd or even? For example 220 would come out even while 221 would come out as an odd number.