// 9.3.1Knox.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include using namespace std; double prompt(); int main() { double avg; avg = prompt(); cout << "The average of the three values is: " << avg << "."; } double prompt() { double sum = 0, value = 0; cout << "Input the first value: "; cin >> value; sum += value; cout << "\nInput the second value: "; cin >> value; sum += value; cout << "\nInput the third value: "; cin >> value; sum += value; cout << "\n\n"; return sum / 3.0; }