Beginner needs help CS114

Basic while loop program enter in numbers determines wether odd or even, positive or negative.

My big problem is that when I input Cntl+Z to end the program it adds +1 to both my negative and even values. Is there a way to avoid this? thanks

Code:

`void main()`

{

int input,

int positive,negative,odd,even;

positive=0;

negative=0;

odd=0;

even=0;

while (!cin.eof())

{

cout <<"enter value:\n";

cin >>input;

if ((input%2==0))

even = even ++;

if ((input%2!=0))

odd = odd ++;

if (input > 0)

positive = positive ++;

if (input < 0)

negative = negative ++;

}

cout <<"positive"<<positive<<endl;

cout <<"negative"<<negative<<endl;

cout <<"even"<<even<<endl;

cout <<"odd"<<odd<<endl;

}