Use the following code as an example, the function you should look at is MOD

<cfloop from="1" to="6" index="currentnumber">
        <cfoutput>
        The number : #currentnumber# is <cfif (currentnumber MOD
2)>odd<cfelse>even</cfif><br>
        </cfoutput>
</cfloop>

Justin

>-----Original Message-----
>From: Jason Larson [mailto:[EMAIL PROTECTED]]
>Sent: Monday, November 20, 2000 3:58 PM
>To: CF-Talk
>Subject: Finding an Odd Number
>
>
>
>Can someone help me out?
>
>I have a cfloop that loops 6 times, I want to be able to be able to output
>what loop number the current loop is on, and tell if the number is even or
>odd.
>
>Any help would be greatly appreciated
>
>Thanks
>Jason Larson
>[EMAIL PROTECTED]
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>Structure your ColdFusion code with Fusebox. Get the official book
>at http://www.fusionauthority.com/bkinfo.cfm
>
>Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
>Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to