Let's look at this line as an example:
test = testweight(testscore(prompttest));
We'll need to see what the function prototypes are as well:
1 2 3
|
int prompttest();
double testscore(int);
double testweight(double);
|
So looking back at what you are trying to do... You are trying to call several functions to get results, then pass the results as parameters to the next function, right?
testweight() looks good at first, as you are trying to pass it the result of testscore(), which is a double and that's what is needed.
testscore() looks good, as you are passing it the result of prompttest(), which is an int and that's what it requires.
...Hey, wait a second. Look carefully at that; you aren't calling prompttest() at all! You're just passing the name of the function - the
prompttest
function itself - to to testscore(), which is not what it wants (an integer, not a function). You'll need to call prompttest() so you can return its result to testscore().
Hope this helps you see the reasoning I used to figure out the problem.