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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists