Update average.cpp