can some body tell , how to write function which
calculates average of all the elements of the 2D array
Printable View
can some body tell , how to write function which
calculates average of all the elements of the 2D array
Sum the elements and divide by the number of elements. (Post your attempt -- and please use [code][/code] tags.)
Walk through all the elements, summing them up. Then divide that total by the number of elements in the array.
EDIT: Beaten to the punch *shakes fist at Dave*