求解释,能运行但计算的结果不正确,谁能帮帮忙
#include <stdio.h>#include <math.h>
#define PI 3.1415926
int main ()
{
int i ,F_num;
printf ("输入力的个数F-num=");
scanf("%d",&F_num);
double *F;
F=new double[F_num];
double *X;
X=new double [F_num];
double *Y;
Y=new double[F_num];
double *Z;
Z=new double [F_num];
double FX,FY,FZ,F_end,FX_end,FY_end,FZ_end,FXYZ_end ;
for (i=1;i<=F_num;i++)
{
printf ("输入力的大小F%d=",i);
scanf ("%lf",&F[i]);
printf ("输入力与X轴间夹角的大小X%d=",i);
scanf ("%lf",&X[i]);
printf ("输入力与Y轴间夹角的大小Y%d=",i);
scanf ("%lf",&Y[i]);
printf ("输入力与Z轴间夹角的大小Z%d=",i);
scanf ("%lf",&Z[i]);
}
for (i=1;i<=F_num;i++)
{FX=F[i]*cos(X[i]*PI/180);
FX_end=0;
FX_end=FX_end+FX;
FY=F[i]*cos(Y[i]*PI/180);
FY_end=0;
FY_end=FY_end+FY;
FZ=F[i]*cos(Z[i]*PI/180);
FZ_end=0;
FZ_end=FZ_end+FZ;
}
FXYZ_end=sqrt(FX_end*FX_end+FY_end*FY_end+FZ_end*FZ_end);
printf ("最后的合力FXYZ_end=%lf",FXYZ_end);
}