Write a function in C that takes 3 parameters: the address of a 2-dimensional array of type int, the number of rows in the array, and the number of columns in the array. Have the function calculate the sum of the squares of the elements. For example, for the array nums that is pictured as:
23 12 14 3
31 25 41 17
the call to the function might be
sumsquares ( nums, 2, 4 ) ;
and the value returned would be 4434. Write a short program to test the function.
2006-11-19
15:09:28
·
3 answers
·
asked by
missbehavin288
1
in
Computers & Internet
➔ Programming & Design