2d array programs

C++ program to multiply two entered matrix

Multiply two entered matrix

This program illustrate the concept of multiply two entered matrix.

  • Here in this program “m=rows” and “n=coloumns” for first matrix.
  • And “p=rows” and “q=coloumns” for second matrix.
  • We can multiply two matrix if and only if rows of first matrix=coloumns of second matrix.


If there are equal rows and coloumns.

multiply two entered matrix

If rows and coloumns are not equal.

multiply two entered matrix

How matrix multiplication takes place

If there is only one row and coloumn

multiply two entered matrix

Comment below if you are facing any problem

Also read

C++ program to show addition and subtraction of two matrix
C++ program to show matrix transpose
C program to multiply two matrix