How to fix: undefined is not a function?

C++ how to fix this program to make it function?

  • include <iostream> #include <conio.h> #include <iomanip> #include <cmath> using namespace std; int getTestScores(); double calcAverage(double average, double testScores); int main() { double testScores = 0; double average = 0; testScores = getTestScores(); average = calcAverage(); cout << fixed << setprecision(1); cout << "Average Score is: " << average << endl; getchar(); return 0; } int getTestScores() { double test1 = 0.0; double test2 = 0.0; double test3 = 0.0; double testScores = 0.0; cout << "First Test: "; cin >> test1; cout << "Second Test: "; cin >> test2; cout << "Third Test: "; cin >> test3; testScores = test1 + test2 + test3; return testScores; } double calcAverage(double averageScore, double testScores){ double averageScores; averageScore = (double)testScores / 3; return averageScore; } Create a program that calcuates the average of three test scores. The program should contain three value-returning functions: main, getTestScore, and calcAverage. The main function should call the getTestScore function to get and return each of three test scores. The test scores may contain a decimal place. The main function then should call the calcAverage function to calculate and return the average of the three test scores. When the calcAverage function has completed its task, the main function should display the average on the screen.

  • Answer:

    teachers don't ask much these days, do they. the only thing that will keep it from working is you need to pass parameters to calcAverage(). I'll let you figure out which ones.

dfsfexsa... at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.