矩阵相乘
来源:互联网 发布:淘宝网通识课代刷 编辑:程序博客网 时间:2024/06/10 00:46
#include<stdio.h>
#define M (10)
#define N (10)
int pro(a[i][j],b[m][n]);
int main()
{
int a[M][N];
int b[M][N];
int c[M][N];
int i,j,m,n;
printf("input A\n");
for(i=0;i<M;i++)
{
for(j=0;j<N;j++)
{scanf("%d",&a[i][j]);}
}
printf("input B\n");//i=0;j=0???
for(m=0;m<M;m++)
{
for(n=0;n<N;n++)
scanf("%d",&b[m][n]);
}
c[i][n]=pro(a[i][j],b[m][n]);
}
int pro(a[i][j],b[m][n])
{
int p1,q1,p2,q2;//int i,j;???
for(q1=0,p2=0;q1<j,p2<m;q1++,p2++)
{
for(p1=0,q2=0;p2<i,q2<n;p1++,q2++)
{
c[p1][q2]=a[p1][q1]*b[p2][q2];
if(p1=i)
printf("\n");
else
printf("%d",c[p1][q2]);
}
}
}
0 0
- 矩阵相乘
- 矩阵相乘
- 矩阵相乘
- 矩阵相乘
- 矩阵相乘
- 矩阵相乘
- 矩阵相乘
- 矩阵相乘
- 矩阵相乘
- 矩阵相乘
- 矩阵相乘
- 矩阵相乘
- 矩阵相乘
- 矩阵相乘
- 矩阵相乘
- 矩阵相乘
- 矩阵相乘!
- 矩阵相乘
- 浅析JavaScript的原型(prototype)(一)
- 合理使用nginxhash策略做更有意义的负载均衡
- linux下安装录制视频软件Simple Screen Recorder
- 《自控力》书摘
- LeetCode 21. Merge Two Sorted Lists
- 矩阵相乘
- spring security学习笔记1
- tslib移植全过程,可能遇到的所有问题,错误
- vim 操作
- 【vijos】【树形dp】佳佳的魔法药水
- Android横竖屏切换小记
- git 取消commit
- 【Oracle】事务
- 笔试经常遇到的选择排序、冒泡排序和二分法查找