标签:info lse ase 图片 com break cas mic a*
# include <stdio.h>
int main()
{int a,b,profit;
float rate,tax;
printf("input a‘s number:");
scanf("%d",&a);
if(a>=5000)
rate=0.15;
else b=a/500;
switch(b) {
case 0: rate=0.00;break;
case 1:
rate=0.05;break;
case 2:
case 3: rate=0.08;break;
case 4:
case 5
: case 6:
case 7:
case 8:
case 9: rate=0.10;break;
} tax=a*rate;
profit=a-(int)(a*rate);
printf("%f,%f,%d",rate,tax,profit);
return 0;
}
标签:info lse ase 图片 com break cas mic a*
原文地址:https://www.cnblogs.com/P201821430014/p/10768905.html