Ms. Whitby's Classroom logo Ms. Whitby's Classroom

Count even values

The remainder operator % helps answer a question: does a number divide evenly by 2?

Your task

Each argument is an integer between -1000 and 1000. Print the number of even arguments. Zero and negative even values count. With no arguments, print 0.

Example arguments

2 7 -4 0

Expected output

3

Before coding, trace one negative number and zero. Which condition gives the same answer for both positive and negative even values?