#include #include //include fstream to decalre input/outfile file handles using namespace std; int main() { int counter, total, avg, loopstop, numeven=0, numodd=0, inputnumber; double avg2; total=0; counter=0; loopstop=10; ifstream fin; fin.open("CS351input.txt"); if (!fin) { cout << "Error. CS351input.txt does not exist \n\n"; exit(1); } while (!fin.eof()) { fin >> inputnumber; cout << "just read in " << inputnumber << endl; //this line is just for debugging total += inputnumber; if ((inputnumber % 2) == 0) numeven++; else numodd++; counter = counter+1; } avg=total/counter; avg2=(double) total/counter; cout << " avg: " << avg<