445,750 Members | 1,199 Online Need help? Post your question and get tips & solutions from a community of 445,750 IT Pros & Developers. It's quick & easy.

 P: 3 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 >.< Feb 23 '07 #1
6 Replies

 10K+ P: 13,264 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 >.< What have you done about it so far? Feb 23 '07 #2

 100+ P: 1,806 You won't get complete code. Why don't you suggest how you intend to solve the problem, and someone here might be able to help you work through it. Try to specify what exactly you are stuck on and any ideas tyou have had Feb 23 '07 #3

 Expert Mod 5K+ P: 8,916 A good place to start is to work out how you would add 2 3x3 matricies on paper. Then you can set about formalising that method into an algorithm to deal with any matrix size up to 100x100 and then program that algorithm into your computer. Feb 23 '07 #4

 P: 3 its simple i think, its just that im a noobie at this hehe. I am to make somethin that goes. . . Input number of rows, columns. and then i type the entries in the form, A = [ 1 0 3 ] + B = [ 4 5 6 ] for a 3X1 matrix and of course get a result of [ 5 5 9 ]. . . Feb 27 '07 #5

 Expert 2.5K+ P: 3,652 A = [ 1 0 3 ] + B = [ 4 5 6 ] for a 3X1 matrix and of course get a result of [ 5 5 9 ]. . . OK, 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? Feb 27 '07 #6

 P: 3 OK, 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? yea thats wat im supposed to make. well hehe i will try making my own version by tomorrow :P Feb 27 '07 #7 