#include #include #define MAX_SIZE 100 // Returns the sum of all elements on the border of a (size x size) 2D array int sum_border(int size, int array[MAX_SIZE][MAX_SIZE]) { // PUT YOUR CODE HERE (change the next line!) return -1; } // This is a simple main function which could be used // to test your sum_border function. // It will not be marked. // Only your sum_border function will be marked. int main(void) { // In the below test array, the sum of the border is 16 // If you modify this array, that sum will change int test_array[MAX_SIZE][MAX_SIZE] = { {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1} }; // If you modify the above array for your own testing, // you may also need to modify the size variable below accordingly int size = 5; printf("The sum of all the border elements is: %d\n", sum_border(size, test_array)); return 0; }