I have a function that calculates the average of inputs but it malfunctions when used in arrays:
void Book::calculateAverage(int rating) { static double s