这个C程序哪里出错了?
#include"math.h"
#include"stdio.h"
#define RAD57.3
double ACX[5][6],ACY[5][6],AMZAF[5][6],AMZWZ[5][2],AXG[11][2],AJZ[3][2],AP[2],
AMV[2],AGC[2],ANDM[2],ANDAF[2],Y[8],B[3],L,S,SONIC,RHO;
double MA,ABC_ALPHA,CX,CY,MZAF,MZWZ,XG,JZ,ALPHA;
FILE *fi,*fo;
main()
{
void rk();
void result();
int i,j;
double h;
fi=fopen"input.dat","r");
for (i=0;i<5;i++)
{
for(j=0;j<6;j++)
fscanf(fi,"%lf",&ACX[i][j]);
}
for (i=0;i<5;i++)
{
for(j=0;j<6;j++)
fscanf(fi,"%lf",&ACY[i][j]);
}
for (i=0;i<5;i++)
{
for(j=0;j<6;j++)
fscanf(fi,"%lf",&AMZAF[i][j]);
}
for (i=0;i<5;i++)
{
for(j=0;j<2;j++)
fscanf(fi,"%lf",&AMZWZ[i][j]);
}
for (i=0;i<5;i++)
{
for(j=0;j<2;j++)
fscanf(fi,"%lf",&AXG[i][j]);
}
for (i=0;i<3;i++)
{
for(j=0;j<2;j++)
fscanf(fi,"%lf",&AJZ[i][j]);
}
for (i=0;i<2;i++)
fscanf(fi,"%lf",&AP[i]);
for (i=0;i<2;i++)
fscanf(fi,"%lf",&AMC[i]);
for (i=0;i<2;i++)
fscanf(fi,"%lf",&AGC[i]);
for (i=0;i<2;i++)
fscanf(fi,"%lf",&ANDM[i]);
for (i=0;i<2;i++)
fscanf(fi,"%lf",&ANDAF[i]);
for (i=0;i<8;i++)
fscanf(fi,"%lf",&Y[i]);
for (i=0;i<3;i++)
fscanf(fi,"%lf",&B[i]);
fscanf(fi,"%lf%lf%lf%lf%lf%lf",&L,&S,&SONIC,&RHO,&h);
close(fi);
参考答案:有几个地方稍稍改了一下。
#include"math.h"
#include"stdio.h"
#define RAD 57.3
double ACX[5][6],ACY[5][6],AMZAF[5][6],AMZWZ[5][2],AXG[11][2],AJZ[3][2],AP[2],
AMV[2],AGC[2],ANDM[2],ANDAF[2],Y[8],B[3],L,S,SONIC,RHO;
double MA,ABC_ALPHA,CX,CY,MZAF,MZWZ,XG,JZ,ALPHA;
FILE *fi,*fo;
main()
{
void rk();
void result();
int i,j;
double h;
fi=fopen("input.dat","r");
for (i=0;i<5;i++)
{
for(j=0;j<6;j++)
fscanf(fi,"%lf",&ACX[i][j]);
}
for (i=0;i<5;i++)
{
for(j=0;j<6;j++)
fscanf(fi,"%lf",&ACY[i][j]);
}
for (i=0;i<5;i++)
{
for(j=0;j<6;j++)
fscanf(fi,"%lf",&AMZAF[i][j]);
}
for (i=0;i<5;i++)
{
for(j=0;j<2;j++)
fscanf(fi,"%lf",&AMZWZ[i][j]);
}
for (i=0;i<5;i++)
{
for(j=0;j<2;j++)
fscanf(fi,"%lf",&AXG[i][j]);
}
for (i=0;i<3;i++)
{
for(j=0;j<2;j++)
fscanf(fi,"%lf",&AJZ[i][j]);
}
for (i=0;i<2;i++)
fscanf(fi,"%lf",&AP[i]);
for (i=0;i<2;i++)
fscanf(fi,"%lf",&AMV[i]);
for (i=0;i<2;i++)
fscanf(fi,"%lf",&AGC[i]);
for (i=0;i<2;i++)
fscanf(fi,"%lf",&ANDM[i]);
for (i=0;i<2;i++)
fscanf(fi,"%lf",&ANDAF[i]);
for (i=0;i<8;i++)
fscanf(fi,"%lf",&Y[i]);
for (i=0;i<3;i++)
fscanf(fi,"%lf",&B[i]);
fscanf(fi,"%lf%lf%lf%lf%lf%lf",&L,&S,&SONIC,&RHO,&h);
close(fi);
}