In the program's main loop{} you have this line:
int averageTemp = total / numReadings; // calculate the averageTemp:
That makes a new local variable called averageTemp. It's not the same as your global averageTemp.
You should have put just:
averageTemp = total / numReadings; // calculate the averageTemp: