[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Function average - calculate the average of a set of reals
Syntax double average(int n, double element[]);
Prototype in mathhk.h
Remarks average calculates the average of a set of n
numbers of type double.
Return value returns the average of a set of n numbers.
See also stddev(), summation(), variance()
Example #include <mathhk.h>
main()
{
double num[] = { 2.3, 7.1, 6.05 };
printf("Average is %lf\n",average(3,num));
}
Program output Average is 5.15
See Also:
stddev()
summation()
variance()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson