Im having no errors in my code but im not able to get my output (i.e. sum of all submatrix of a given matrix}
2D array brute force O(N^6}
Check now.You were not initializing the 2D array correctly
-
you have not intialize 2D array correctly
correct way is
int a[2][2]={{1,1},{1,1}}; -
at line no 13
for(int lj=0;lj<n;li++)
lj should increase not li -
there is no header file conio.h in c++
Modified Code