The logic you have currently added will not work for your problem. The algorithm you have in place is designed for an array of input, but you are only taking one input at a time. Instead of storing input as an array, it would be much easier to calculate the min/max values on the fly since you are already determining what is odd and what is even.
Like your calculation of the sum and count, the min/max values need to be calculated inside the loop.
You should create 4 new variables: minEven, maxEven, minOdd, maxOdd.
Set the min values to positive infinity, and the max values to negative infinity.
Then, in each section of your IF-ELSE statement, you need to do the min and max tests. The tests will be nearly identical in both the even and odd sections, with the only different being the variables in use.
Here is the check you can use to determine the max value, which I hope you can adapt yourself to work with the min value:
if(max < userInput) {
max = userInput;
}
// don't need an else because reassignment should only happen if the value changes
Remember, you will have one max check and one min check in each section of your IF-ELSE block.
Good luck!