For example, if you had

XXXXX

XXXXX

XXXXX

the underlined items would be ur interior elements that you need to add together and the rest of the elements that arent underlined are your border items. The border items must be added together seperately. So you get two different Sums. interior_Sum and border_Sum.

This is what i have so far. Basicly I know that its my loops so I just need help on how to change them to only add the certain elements described above together into their particular sum.

for (int i=0; i <= n-1; i++) { for (int j=0; j <= n-1; j++) { border_Sum = border_Sum + x[i][j]; } }

This is for border. below is for interior if their is an interior of the matrix

for (int i=0; i <= n-1; i++) { for ( int j=0; j <=n-1; j++) { interior_Sum = interior_Sum + x[i][j]; } }

Remember we are working with 2 dimensional matrixs where rows and columns are a factor. The loops need ot be able to adjust to a number of different matrixes that the user defines. not just the one i posted above. The matrixes only go up to 10 * 10. Thanks

This post has been edited by **wakemalibu**: 22 October 2008 - 02:58 PM