one more code on quiz....

This is a discussion on one more code on quiz.... within the C++ Programming forums, part of the General Programming Boards category; Find out if numTickets is an even number. If it is, display "Yes, it is even". Otherwise display "No, it ...

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    3

    one more code on quiz....

    Find out if numTickets is an even number. If it is, display "Yes, it is even". Otherwise display "No, it is odd".

  2. #2
    Señor Member
    Join Date
    Jan 2002
    Posts
    561
    if (numTickets%2==0)
    cout << "Yes, it is even";
    else
    cout << "No, it is odd";

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Proposal: Code colouring
    By Perspective in forum A Brief History of Cprogramming.com
    Replies: 28
    Last Post: 05-14-2007, 07:23 AM
  2. Values changing without reason?
    By subtled in forum C Programming
    Replies: 2
    Last Post: 04-19-2007, 10:20 AM
  3. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 11:38 AM
  4. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  5. Replies: 0
    Last Post: 02-21-2002, 05:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21