Thread: if statment

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    58

    if statment

    How would i say if x is a even number.... or x is an odd number....?

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    79
    if (x % 2 == 0) // i.e. if x is an even number

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 13
    Last Post: 09-24-2008, 06:16 PM
  2. How to cast a ListBox item to an int for a switch statment?
    By Swaine777 in forum C++ Programming
    Replies: 8
    Last Post: 09-26-2004, 08:52 PM
  3. if statment question
    By Carsten in forum C++ Programming
    Replies: 3
    Last Post: 12-02-2002, 05:50 PM
  4. If statment +text
    By Zewu in forum C++ Programming
    Replies: 4
    Last Post: 01-07-2002, 04:31 PM