求救!!
这个程序有什么错误??为什么incoming好像被赋值了8300?
#include"math.h"
#include"stdio.h"
main()
{ int profile,incoming,real;
scanf("The incoming is %d .\n",incoming);
real=incoming*0.1;
printf("%d",real);
switch(real)
{
case 10 : profile=10*0.1+10*0.1+20*0.075+20*0.03+40*0.015+(incoming-100)*0.01; break;
case 9 :
case 8 :
case 7 :
case 6 : profile=10*0.1+10*0.1+20*0.075+20*0.03+(incoming-60)*0.015; break;
case 5 :
case 4 : profile=10*0.1+10*0.1+20*0.075+(incoming-40)*0.03; break;
case 3 :
case 2 : profile=10*0.1+10*0.1+(incoming-20)*0.075; break;
case 1 : profile=10*0.1+(incoming-10)*0.1; break;
case 0 : profile=incoming*0.1; break;
}
printf("The profile is %d.\n",profile);
}