#include <stdio.h>
#include <math.h>
float math(int, int, int, int, int, float, float, float);
main() {
int a, b, c, d, e;
float sum, avg, sd;
printf("Enter Five Integers->");
scanf("%d%d%d%d%d", &a, &b, &c, &d, &e);
math(a, b, c, d, e, sum, avg, sd);
printf("Sum=%.2f\nAverage=%.2f\nStandard Deviation=%.2f", sum, avg, sd);
}
float math(int a, int b, int c, int d, int e, float sum, float avg, float sd) {
sum = a + b + c + d + e;
avg = (sum) / 5;
sd = pow(
((pow(a - avg, 2) + pow(b - avg, 2) + pow(c - avg, 2) + pow(d - avg, 2),
pow(e - avg, 2)) /
5),
0.5);
return sum, avg, sd;
}
My program always returns the answer 0.00. Can anyone explain what is the problem with my code?