![](https://img-blog.csdnimg.cn/img_convert/7da4cf42432bb3bc823154e7bca26957.png)
c++实现矩阵乘法运算
Here is the program for matrix multiplication in C.
这是C语言中矩阵乘法的程序。
m and n are rows and columns of first matrix.
m和n是第一矩阵的行和列。
p and q are rows and columns of second matrix.
p和q是第二矩阵的行和列。
Then, multiplication is possible only if n==p.
然后,只有在n == p时才有可能相乘。
C中的矩阵乘法 (Matrix Multiplication in C)
#include<stdio.h>
int main()
{
int a[5][5],b[5][5],c[5][5],m,n,p,q,i,j,k;
printf("Enter rows and columns of first matrix:");
scanf("%d%d",&m,&n);
printf("Enter rows and columns of second matrix:");
scanf("%d%d