# Initialize two integer variabl

**Question description**

Initialize two integer variables and set them to zero. Then continuing with programming assignment #3, loop through each item in the array and do a calculation to determine if the number is even or odd (using the modulus operator). Using a switch statement, increment one variable for all even numbers and do the same for the other variable for any odd numbers (using the increment operator).

Output the total number of even and off numbers to the screen.

Example output:

34

53

125

854

8

1045

66

9434

5205

235

There are 5 even numbers.

There are 5 odd numbers.

## Tutor Answer

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors