能帮忙查下,这个哪里错了么
#include <stdio.h>#include <math.h>
#define PI 3.1415926
int main ()
{
double F1,F2,F_end ;
double angles,angle_end;
int F_num,i;
printf("the number of F");
scanf ("%d",&F_num);
double F[F_num];
double angle[F_num-1];
F1=F[1];
F2=F[2];
for (i=1;i<=F_num;i++)
{
printf ("F%d=",i);
scanf ("%lf",&F[i]);
}
for (i=1;i<=F_num-1;i++)
{
printf ("angle%d=",i);
scanf ("%lf",&angle[i]);
}
for (i=1;i<=F_num-1;i++)
{
angle_end =angle[i]*PI/180;
F_end =sqrt(F1*F1+F2*F2-2*F1*F2*cos(PI-angle_end));
angles=acos((F2*F2+F_end*F_end-F1*F1 )/(2*F2*F_end));
F1=F_end;
F2=F[i+2];
angle_end=angle[i+1]+angles;
}
printf ("最后的合力为F_end%lf=",F_end);
}
程序在C-free5.0运行没问题,就是答案不正确,能帮忙看看是哪里出问题了么