Write a program that reads a sequence of positive integers and prints them indicating if they are even or odd. Then it prints out the number, sum, and average of the even numbers and the same for the odd numbers.
You will indicate the end of the sequence by using as "sentinel" a negative or zero number.