Program this problem incrementally. IE get step 1 to work then step 2 to work and so on. The form of your program should be as follows. This is the usual practice preached by SE's. Can you think of reasons this structure is often requested?
1. #includes
2. All Prototypes, function declarations
3. Main
4. Function Definitions
operations are
1. Dump the array. Note Dump() is the only function that is allowed to have cout's. e.g. no standard out output for the other functions. Dump means to print out the array a row at a time.
2. Print out the 4th row and the 7th column. This is not in a function. Just write inline code to do this. You can have cout's in main here;;
3. Calculate and print the sum of every value in the array using a function that you write called int Sum( int A[][], int numRows,int numCols)
4. Calculate the sum of the two diagonals. Now print the absolute value of their difference. You do not need a function here
5. Create a function called int BorderSum( int A[][], int numRows,int numCols) that returns the sum of the values that occur on all four sides of the array, e.g. the border. Call this function and print out the returned value.
6. Create a function called int InsideSum( int A[][], int numRows,int numCols) that returns the sum of the values on the inside of the array , e.g. sum of everything BUT the border. THINK! This is now easy.
7. Create a function called Transpose( int A[][], int numRows,int numCols) that will modify the array sent in by performing a transposeoperation on the array. If numRows!=numCols then do nothing otherwise flip the array about the main diagonal (upper left to lower right).
Print the above and combine it together with your source and output. Create two outputs, one with a 3 by 3 matrix and one with a 10 by 10 matrix. Staple together and hand in.