C语言报错error C2146: syntax error : missing ';' before identifier 'F'
#include<stdio.h>
#include<math.h>
double v;
int m;
int dData[50][2]={{5,0},{0,4017},{100,3569},{165,3479},{200,3021},{300,2168},{400,1648},{500,1315},{600,1089},{700,922},{800,785},{900,652},{1000,530}};
double GetSpeedd(double v)
{
int i ;
for (i=2;i<=dData[0][0];i++)
{
if (v>=dData[i-1][0]*0.1 && v<=dData[i][0]*0.1)
{
return 1.0*(dData[i][1]-dData[i-1][1])/(dData[i][0]-dData[i-1][0])*(v-dData[i-1][0]*0.1)+dData[i-1][1]*0.1;
}
}
return -1;
}
void main()
{
printf("计算DF4h型内燃机车牵引力:\n");
printf("请输入运行手柄位数:\n");
scanf("%d,%d",&m);
printf("请输入机车速度(km/h):\n");
scanf("%d",&v);
double F;
if(m=8)
F=GetSpeeda(v);
else if (m=12)
F=GetSpeedb(v);
else if(m=15)
F=GetSpeedc(v);
else(m=16)
F=GetSpeedd(v);
printf("机车牵引力为%lf\n",&F);
}