This is from yours,
V.VARADHA RAJAN
double Sma(double *nums, int n)
{
double total = 0;
int i;
for (i = 0; i < n; i++)
total += nums[i];
return total / n;
}To find geometric mean also try the followingdouble Sma(double *nums, int n)
{
double total = 0;
int i;
for (i = 0; i < n; i++)
total *= nums[i];
return pow(total,double(1/n));
}Please send comment on this mail..Thank you..
[Non-text portions of this message have been removed]
