take an N x N matrix, and create a new, (N-1) x (N- 1), matrix with each element being the sum of four nearby elements. You need to figure out a way to break the matrix up into squares and iterate through the matrix, while staying within its bounds. For example:
0 1 2
3 4 5
6 7 8
Result:
8 12
20 24
You need an iterative calculate_result() function that takes the original N x N array and fills the result array with the correct sum of the four neighboring elements, and also, you need a recursive_calculate_result()function that does the same thing as calculate_result but recursively. Requirements for your program:
o Read the N value from the user
o Initialize the N x N array
o Print the initial array and the resulting array
o All functions (including main) must not be more than 15 lines of code!!!