C:\Program Files (x86)\Microsoft Visual Studio\MyProjects\a\a0.cpp(17) : warning
#include "stdio.h"void main()
{
float iX,iZ;
printf("输入一个重量数");
scanf("%f",&iX);
printf("货物重%f公斤\n",iX);
if(iX>=0&&iX<=5)
iZ=3*iX;
else iF(iX>5&&iX<=10)
iZ=3*5+(iX-5)*3.5;
else if(iX>10&&iX<=20)
iZ=3*5+5*3.5+(iX-10)*4;
else if(iX>20&&iX<=30)
iZ=3*5+5*3.5+10*4+(iX-20)*4.5;
else if(iX>30&&iX<=50)
iZ=3*5+5*3.5+10*4+10*4.5+(iX-30)*5;
else
iZ=-1;
if(iZ>=0)
printf("快递费是%f\n",iZ);
else
printf("超重,拒收");
}