Question - odd or even

# Thread: Question - odd or even

1. Senior Member
Join Date
Dec 1969
Posts
2,049

## Question - odd or even

How can I determine whether or not a number is odd or even?<BR><BR>Example Use:<BR><BR>For i = 0 To 10<BR>If IsOddNumber(i) Then<BR>.....<BR>Else<BR>.....<BR>End If<BR>Next<BR><BR>Any solutions?<BR>

2. Senior Member
Join Date
Dec 1969
Posts
2,885

## RE: Question - odd or even

For i = 0 To 10<BR>If i Mod 2 Then<BR>Response.Write "Even<BR>"<BR>Else<BR>Response.Write "Odd<BR>"<BR>End If<BR>Next

3. Senior Member
Join Date
Dec 1969
Location
Los Angeles, CA
Posts
21,192

## R&D MOD <eop>

.

4. Senior Member
Join Date
Dec 1969
Posts
1,765

## Oh man! ChrisN got you by 4 seconds!!

.

5. Senior Member
Join Date
Dec 1969
Posts
2,049

## RE: Thank you both. <eop>

.

6. Senior Member
Join Date
Dec 1969
Posts
2,885

## and I was wrong!!!! :)

gotta switch my logic:<BR><BR>For i = 0 To 10<BR>If i Mod 2 Then<BR>Response.Write i & " is ODD<BR>"<BR>Else<BR>Response.Write i & " is EVEN<BR>"<BR>End If<BR>Next

7. Senior Member
Join Date
Dec 1969
Posts
1,765

## Great...that just kills the whole thing

Boo for you.......<BR><BR><BR><BR>LOL...Just kidding....cause you still got your post in 4 seconds faster!!!!

8. Senior Member
Join Date
Dec 1969
Location
Los Angeles, CA
Posts
21,192

## I did pretty good

considering the fact that i am still asleep :p<BR><BR>

9. Senior Member
Join Date
Dec 1969
Location
Los Angeles, CA
Posts
21,192

## Does not take time

to get a WRONG post in fast :p<BR><BR><BR>

10. Senior Member
Join Date
Dec 1969
Posts
2,885

## aaahh...but

I had a Jamaican Beef Patty in one hand - handycapped

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•