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
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
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
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
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:
5 matches
Mail list logo