Auto commit

This commit is contained in:
smallkun 2025-03-28 09:07:47 +08:00
parent 2a43e05b5f
commit 4732388b07

View File

@ -509,6 +509,45 @@ int main(){
10 17 10 17
``` ```
```c
#include <stdio.h>
int main(){
int m, n, s;
scanf("%d %d", &m, &n);
int a[m][n];
for(int i=0;i<m;i++){
for(int j=0;j<n;j++){
scanf("%d", &a[i][j]);
}
}
int q,p;
scanf("%d %d", &q, &p);
int b[q][p];
for(int i=0;i<q;i++){
for(int j=0;j<p;j++){
scanf("%d", &b[i][j]);
}
}
printf("\n");
for(int i=0;i<m;i++){//数组a行下标
for(int k=0;k<p;k++){//数组b的列下标
s = 0;
for(int j=0;j<n;j++){//数组a的列下标和数组b的行下标
s+= a[i][j] * b[j][k];
}a
printf("%d ", s);
}
printf("\n");
}
return 0;
}
```
<img src="https://yp.smallkun.cn/markdown/image-20250322222018779.png!compress" alt="image-20250322222018779" style="zoom:50%;" /> <img src="https://yp.smallkun.cn/markdown/image-20250322222018779.png!compress" alt="image-20250322222018779" style="zoom:50%;" />