为什么代码运行会出现这个错误呢,大佬能帮忙解答下吗?感激不尽!
#include<stdio.h>
int main()
{
int second_function(int parameter);
float profit,total_commission,else_,part_1,part_2,part_3,part_4,part_5,part_6;
int grade,parameter;
scanf("%float",profit);
if (profit<=100000) {grade=1;parameter=1;}
else if (profit<=200000) {grade=2;parameter=2;}
else if (profit<=400000) {grade=3;parameter=3;}
else if (profit<=600000) {grade=4;parameter=4;}
else if (profit<=1000000) {grade=5;parameter=5;}
else grade=6;parameter=6;
switch(grade)
{
case 6:part_1=(1.0/100)*(profit-1000000);else_=second_function(parameter);total_commission=part_1+else;break;
case 5:part_2=(1.5/100)*(profit-600000);else_=second_function(parameter);total_commission=part_2+else;break;
case 4:part_3=(3.0/100)*(profit-400000);else_=second_function(parameter);total_commission=part_3+else;break;
case 3:part_4=(5.0/100)*(profit-200000);else_=second_function(parameter);total_commission=part_4+else;break;
case 2:part_5=(7.5/100)*(profit-100000);else_=second_function(parameter);total_commission=part_5+else;break;
case 1:part_6=(10.0/100)*profit;
}
printf("The total commission is %f",total_commission);
return 0;
}
int second_function(int parameter)
{
float part_2=part_3=part_4=part_5=part_6=0.0;
switch(parameter)
{case 6:part_2=(1.5/100)*400000;
case 5:part_3=(3.0/100)*200000;
case 4:part_4=(5.0/100)*200000;
case 3:part_5=(7.5/100)*100000;
case 2:part_6==(10.0/100)*100000;
return (part_2+part_3+part_4+part_5+part_6);
}