vscode集成控制台正常,用cmd输入后没有输出咋回事哇?

#include<stdio.h>
int main()
{   int c,s;
    float p,w,d,f;
    scanf("%f,%f,%d",&p,&w,&s);
    if(s>=3000)c=12;
    else c=s/250;
    if(c==12)d=15;
    else if (8<c<=11) d=10;
    else if (3<c<=8) d=8;
    else if (1<c<=3) d=5;
    else if (c=1) d=2;
    else if (c=0) d=0;
    f=p*w*s*(1-d/100.0);
    printf("freight=%15.4f",f);
    getchar();
    return 0;
}

。话说我第二行的int改为void 删掉return 0 也会报错是为什么?

在部分C编译器中,要求main函数必须有返回值。
C中不能连续使用逻辑运算符,if else if修改如下:
if(c==12)d=15;
else if (8<c && c<=11) d=10; //注意&&
else if (3<c && c<=8) d=8;
else if (1<c && c<=3) d=5;
else if (c==1) d=2; //原代码少写了一个=
else if (c==0) d=0;//原代码少写了一个=