Odd and Even numbers

Results 1 to 2 of 2

Thread: Odd and Even numbers

  1. #1
    Join Date
    Dec 1969

    Default Odd and Even numbers

    Can anyone tell me the code required for the following statement (scenario is retreiving id from database)<BR><BR>IF id = Even Number then<BR>Response.Write "Even number"<BR>Else<BR>Response.Write "Odd number"<BR>End IF

  2. #2
    Join Date
    Dec 1969

    Default Use mod for the remainder of a division

    IF (id mod 2) = 0 then <BR>Response.Write "Even number" <BR>Else <BR>Response.Write "Odd number" <BR>End IF

Posting Permissions

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