RE: How to tell if a number is a multiple of 3?

2001-11-20 Thread Will Swain

divide by 3 and see if the result is a whole number?

will

-Original Message-
From: Melanie Maddix [mailto:[EMAIL PROTECTED]]
Sent: 20 November 2001 14:34
To: CF-Talk
Subject: How to tell if a number is a multiple of 3?


Hello,

I am trying to figure out how to use CF code to determine whether or not a
variable is a multiple of 3.

Does anyone have any suggestions?

Thank you,
Melanie

~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: How to tell if a number is a multiple of 3?

2001-11-20 Thread Nate Smith

Use the mod function.

CFIF mynumber MOD 3 EQ 0
!--- it's a multiple ---
CFELSE
!--- it's not a multiple ---
/CFIF

-
Nate Smith, 
Lead Developer
Macromedia Coldfusion 5 Certified Professional
Macromedia Certified Web Site Developer
[EMAIL PROTECTED] 
www.doceus.com 



 -Original Message-
 From: Will Swain [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, November 20, 2001 9:37 AM
 To: CF-Talk
 Subject: RE: How to tell if a number is a multiple of 3?
 
 
 divide by 3 and see if the result is a whole number?
 
 will
 
 -Original Message-
 From: Melanie Maddix [mailto:[EMAIL PROTECTED]]
 Sent: 20 November 2001 14:34
 To: CF-Talk
 Subject: How to tell if a number is a multiple of 3?
 
 
 Hello,
 
 I am trying to figure out how to use CF code to determine 
 whether or not a
 variable is a multiple of 3.
 
 Does anyone have any suggestions?
 
 Thank you,
 Melanie
 
 
~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: How to tell if a number is a multiple of 3?

2001-11-20 Thread Larry Juncker

CFLOOP FROM=1 to=39 index=a
CFIF a MOD 3 EQ 0cfoutput#a#/cfoutput/CFIF
/CFLOOP

Larry Juncker
Senior Cold Fusion Developer
Heartland Communications Group, Inc.
[EMAIL PROTECTED] 

-Original Message-
From: Melanie Maddix [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 20, 2001 8:34 AM
To: CF-Talk
Subject: How to tell if a number is a multiple of 3?


Hello,

I am trying to figure out how to use CF code to determine whether or not a
variable is a multiple of 3.

Does anyone have any suggestions?

Thank you,
Melanie

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: How to tell if a number is a multiple of 3?

2001-11-20 Thread Lon Lentz

  x mod 3 eq 0


-Original Message-
From: Melanie Maddix [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 20, 2001 9:34 AM
To: CF-Talk
Subject: How to tell if a number is a multiple of 3?


Hello,

I am trying to figure out how to use CF code to determine whether or not 
a
variable is a multiple of 3.

Does anyone have any suggestions?
~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: How to tell if a number is a multiple of 3?

2001-11-20 Thread Dave Wilson

Use MOD 3

Like this:

cfloop from=1 to=10 index=current
cfoutput#current#/cfoutput
cfif current MOD 3 EQ 0
is a multiple of 3
cfelse
is NOT a multiple of 3/cfifbr
/cfloop


HTH,
Dave

 -Original Message-
 From: Melanie Maddix [mailto:[EMAIL PROTECTED]]
 Sent: 20 November 2001 14:34
 To: CF-Talk
 Subject: How to tell if a number is a multiple of 3?


 Hello,

 I am trying to figure out how to use CF code to determine whether or not a
 variable is a multiple of 3.

 Does anyone have any suggestions?

 Thank you,
 Melanie
 
~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists