How to find the maximum sum sub matrix of given matrix

i do not get the ouput i just
my code is

hello @dkroy8790
the logic u are applying to get maximum sum submatrix is not correct.
it is computing maximum sum of an element in all submatrix that includes it.

a) apply approach II and find maximum sum submatrix in O(n^4)
b) or check this kadane algorithm to find max sum submatrix in O(n^3)->