somebody please help me create this program. . .I am to make a c/c++ code that adds two matrices. The user will input the dimension of his matrix to be added (with a maximum of 100x100 dimension). . . thnx >.<
Matrix Addition
Collapse
X
-
Originally posted by odeacsomebody please help me create this program. . .I am to make a c/c++ code that adds two matrices. The user will input the dimension of his matrix to be added (with a maximum of 100x100 dimension). . . thnx >.< -
Originally posted by odeacA = [ 1 0 3 ] + B = [ 4 5 6 ] for a 3X1 matrix and of course get a result of [ 5 5 9 ]. . .
You have matrix A and matrix B of some dimensions. If and only if the dimensions of A match the dimensions of B, then the sum of the two matrices (matrix C) is the sum of each element in A added to the corresponding sum of B - this sum is placed in the corresponding element of C.
Can you take this general idea and make it into a program?Comment
-
Originally posted by Ganon11OK, so let me try to restate this in more general terms:
You have matrix A and matrix B of some dimensions. If and only if the dimensions of A match the dimensions of B, then the sum of the two matrices (matrix C) is the sum of each element in A added to the corresponding sum of B - this sum is placed in the corresponding element of C.
Can you take this general idea and make it into a program?Comment
Comment