How do I write this while loop program?

Update: I started with this:

int num=0;
int sumeven=0;
int sumodd=0;
int evencount=0;
int oddcount=0;
5 answers 5