Find out if numTickets is an even number. If it is, display "Yes, it is even". Otherwise display "No, it is odd".
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 ...
Find out if numTickets is an even number. If it is, display "Yes, it is even". Otherwise display "No, it is odd".
if (numTickets%2==0)
cout << "Yes, it is even";
else
cout << "No, it is odd";