Write a program to read in two n x n sparse matrices, add the matrices, and print out the sum matrix. All three sparse matrices must be represented in a way that is similar to the sparse matrix representation in section 2.3 of the book. That is, the row number, column number, and value for each non-zero matrix entry should be kept. Zero values are not stored.
The data for this program is contained in the file 310-SMD.COMPSCI. form of the data is as follows:
1st record - n in the first 4 columns
next n records - each record contains the n values in a row of
the first matrix. Each value takes 4 columns.
next n records - each record contains the n values in a row
of the second matrix. Each value takes 4 columns
The maximum value for n is 10. The maximum number of non-zero elements in any of these sparse matrices is 20.
The printout of the sun matrix should be a simple list of its non-zero values and their position (row and column numbers) within the matrix.