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</cfif><br> </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