#include #include #define NUM_COLS 5 #define MAX_ROWS 100 int max_consec_row_diff(int num_rows, int array[MAX_ROWS][NUM_COLS]); // This is a simple main function which could be used // to test your max_consec_row_diff function. // It will not be marked. // Only your max_consec_row_diff function will be marked. int main(void) { int test_array[MAX_ROWS][NUM_COLS] = { {3, 5, 1, 2, 0}, {6, 1, 5, 4, 3}, {1, 6, 2, 3, 7}, {19, 0, 0, 0, 0}, {0, 5, 1, 2, 3}, }; int result = max_consec_row_diff(5, test_array); // Row sums: 11, 19, 19, 19, 11 → adjacent |diff|: 8, 0, 0, 8 → max 8 printf("%d\n", result); return 0; } // Return the largest absolute difference between the sum of one row and the sum // of the next row, over all consecutive pairs of rows. // If there is only one row (no consecutive pair), return -1. int max_consec_row_diff(int num_rows, int array[MAX_ROWS][NUM_COLS]) { // PUT YOUR CODE HERE (change the next line!) return -1; }