In this program user asks to add two matrixes. Thus the program execution is completed. An example of a matrix is as follows. Finally using two for loops it prints the elements of the Sum matrix as given below: Sum matrix: 3 3 3 3 3 3 3 3 3. Firstly, ask from user order of matrix number of rows and column. In C programming an array can have two, three, or even ten or more dimensions.
Join Stack Overflow to learn, share knowledge, and build your career. Connect and share knowledge within a single location that is structured and easy to search. I am trying to multiply two 3x3 matrices. The first 2 numbers in the first and second row are the only correct answer. What am I doing wrong? One thing that I notice that you don't do is initialize you're r array.
Try it now. Two matrices can be multiplied only if the number of columns in the first matrix is equal to the number of rows in the second matrix. Load Comments. Toggle navigation Home. Blog Contact About.
Skip to content. All Homes Search Contact. But what would it be good for? Net, etc. C program to display employee details in the order of salary from file employee.