CIS 71: Homework 2

Handed out: 09/05/2006
Due: by Noon on 9/12
Email program to TA

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.