三个矩阵相加,求出得数不对,帮忙看看是否调用函数相加有错,谢谢!
#include<stdio.h>int main()
{
int i, j;
double D4 = { 1,2,3,4,5,6 }, D5 = { 1,2,3,4,5,6 }, D6 = { 1,2,3,4,5,6 }, D7 = {0,0,0,0,0,0};
void fun3(double m1,double m2,double m3,double m4);
fun3(D4,D5,D6,D7);
for (i = 0; i < 6; i++)
{
for (j = 0; j < 1; j++)
{
printf("%lf \n", D7);
}
}
return 0;
}
//6*1矩阵相加
void fun3(double m1, double m2, double m3, double m4)
{
int i, j;
for (i = 0; i < 6; i++)
{
for (j = 0; j < 1; j++)
{
m4 = m1 + m2 + m3;
}
}
}
已经找到错误 大家不用恢复了
吴敌小白 发表于 2020-11-27 16:02
大家不用恢复了
你自己点“发帖”,修改成已经解决即可
页:
[1]