?? chengfa.cpp
字號(hào):
#include<iostream.h>
const int n=2;
void chengfa(double (*x1)[n],double (*x2)[n],double (*x)[n],int m,int n,int l);
void main()
{
int m=2,l=1;
double x1[n][n]={1,2,3,4},x2[n][n]={8,0,1,0},x[n][n];
chengfa(x1,x2,x,m,n,1);
for(int i=0;i<m;i++)
{ for(int j=0;j<1;j++)
cout<<x[i][j]<<" ";
cout<<endl;
}
}
void chengfa(double (*x1)[n],double (*x2)[n],double (*x)[n],int m,int n,int l)
{
for(int i=0;i<m;i++){
for(int j=0;j<l;j++)
{
x[i][j]=0;
for(int k=0;k<n;k++)
x[i][j]+=x1[i][k]*x2[k][j];
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -