当前位置:网站首页>C language for calculating the product of two matrices
C language for calculating the product of two matrices
2022-07-07 08:52:00 【Please Sit Down】
int main(){
int a[3][2]={2,-1,-4,0,3,1},b[2][2]={7,-9,-8,10};
int i,j,k,s,c[3][2];
for(i=0;i<3;i++){
for(j=0;j<2;j++){
for(k=s=0;k<2;k++) s+=a[i][k]*b[k][j];
c[i][j]=s;
}
}
for(i=0;i<3;i++){
for(j=0;j<2;j++) printf("%5d",c[i][j]);
printf("\n");
}
return 0;
}
边栏推荐
- 【微信小程序:缓存操作】
- 調用華為遊戲多媒體服務的創建引擎接口返回錯誤碼1002,錯誤信息:the params is error
- Golan idea IntelliJ cannot input Chinese characters
- ncs成都新電面試經驗
- [wechat applet: cache operation]
- Nanjing commercial housing sales enabled electronic contracts, and Junzi sign assisted in the online signing and filing of housing transactions
- You should use Google related products with caution
- 更改当前文件夹及文件夹下文件日期shell脚本
- Greenplum6.x搭建_环境配置
- 详解华为应用市场2022年逐步减少32位包体上架应用和策略
猜你喜欢
Greenplum 6.x common statements
NCS Chengdu New Electric interview Experience
[step on the pit] Nacos registration has been connected to localhost:8848, no available server
How to integrate app linking services in harmonyos applications
Greenplum 6.x monitoring software setup
登山小分队(dfs)
Other 7 features of TCP [sliding window mechanism ▲]
About using CDN based on Kangle and EP panel
联想混合云Lenovo xCloud:4大产品线+IT服务门户
leetcode134. gas station
随机推荐
关于基于kangle和EP面板使用CDN
[Chongqing Guangdong education] organic electronics (Bilingual) reference materials of Nanjing University of Posts and Telecommunications
Enterprise manager cannot connect to the database instance
更改当前文件夹及文件夹下文件日期shell脚本
leetcode134. gas station
数字三角形模型 AcWing 275. 传纸条
[step on the pit] Nacos registration has been connected to localhost:8848, no available server
年薪50w阿裏P8親自下場,教你如何從測試進階
Greenplum 6.x build_ Environment configuration
[Nanjing University] - [software analysis] course learning notes (I) -introduction
Go write a program that runs within a certain period of time
年薪50w阿里P8亲自下场,教你如何从测试进阶
ncs成都新電面試經驗
[MySQL] detailed explanation of trigger content of database advanced
uniapp 微信小程序监测网络
注解@ConfigurationProperties的三种使用场景
登山小分队(dfs)
With an annual salary of 50W, Alibaba P8 will come out in person to teach you how to advance from testing
String operation
Tronapi-波场接口-源码无加密-可二开--附接口文档-基于ThinkPHP5封装-作者详细指导-2022年7月6日-新手快速上手-可无缝升级tp6版本