#include #define TEST_ARRAY_SIZE 4 // Return the sum of all values in a square 2D array which are divisible by 5 // with sides of length side_length. int count_divisible(int array[TEST_ARRAY_SIZE][TEST_ARRAY_SIZE], int side_length) { // PUT YOUR CODE HERE (you must change the next line!) int sum = 0; int i = 0; while (i < side_length) { int j = 0; while (j < side_length) { // check if each element is divisible by 5 if (array[i][j] % 5 == 0) { sum = sum + array[i][j]; } j++; } i++; } return sum; } // This is a simple main function which could be used // to test your count_divisible function. // It will not be marked. int main(void) { int test_array[TEST_ARRAY_SIZE][TEST_ARRAY_SIZE] = { { 1, 2, 3, 4 }, {-1, -10, -110, -110}, { 0, 0, 0, 0 }, { 22, -22, 2, 2 } }; int result; result = count_divisible(test_array, 1); printf("count_divisible in 1x1 array: %d\n", result); result = count_divisible(test_array, 2); printf("count_divisible in 2x2 array: %d\n", result); result = count_divisible(test_array, 3); printf("count_divisible in 3x3 array: %d\n", result); result = count_divisible(test_array, 4); printf("count_divisible in 4x4 array: %d\n", result); return 0; }