int main() { double a[3] = {1,2,3}; int b[2][3] = {1,2,3,4,5,6}; double c[2][3][5]; c[0][0][0] = 10; c[0][0][1] = 20; double meanval; meanval = mean(a); printf("mean(a) = %f\n", meanval); meanval = mean(b); printf("mean(b) = %f\n", meanval); meanval = mean(c); printf("mean(c) = %f\n", meanval); }
mean(a) = 2.000000 mean(b) = 3.500000 mean(c) = 1.000000