|
-
October 27th, 2010, 03:39 PM
#21
Re: Help wit C++
 Originally Posted by GCDEF
That'll work. Don't forget the second part of the problem.
In addition, write a statement that invokes the calcAverage function and assigns its return value to a double variable named quotient. Use the following numbers as the actual arguments: 45.67, 8.35, 125.78, 99.56.
double calcAverage (double, double, double, double); // prototype
double calcAverage (45.67, 8.35, 125.78, 99.56) // invoke
double calcAverage (double num1, double num2, double num3, double num4)
{
double quotient = 0.0;
quotient = (num1 + num2 + num3 + num4) / 4;
return quotient;
} // end of calcAverage function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|