#include <stdio.h>
#include <stdlib.h>
#include <math.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char argv[]) {
int x;
printf("请输入购买总额");
scanf("%d",&x);
float y,m;
if(x<=0)
printf("输入错误");
else
switch(x/100)
{case 0:
m=1;break;
case 1:
case 2:
m=0.95;break;
case 3:
case 4:
case 5:
m=0.9;break;
default:
m=0.85;break;
}
y=mx;
printf("实际金额:%f\n",&y);
return 0;
}