#include <stdio.h>
void main()
{
int x,y;
float z;
printf("enter x,y:\n");
scanf("%d%d",&x,&y);
switch(y)
{
case 1: z=x+x*12*0.315/100;break;
case 2: z=x+x*12*2*0.330/100;break;
case 3: z=x+x*12*3*0.345/100;break;
case 5: z=x+x*12*5*0.375/100;break;
case 8: z=x+x*12*8*0.420/100;break;
default: printf("数据错误!\n");
}
printf("%f\n",z);
}
void main()
{
int x,y;
float z;
printf("enter x,y:\n");
scanf("%d%d",&x,&y);
switch(y)
{
case 1: z=x+x*12*0.315/100;break;
case 2: z=x+x*12*2*0.330/100;break;
case 3: z=x+x*12*3*0.345/100;break;
case 5: z=x+x*12*5*0.375/100;break;
case 8: z=x+x*12*8*0.420/100;break;
default: printf("数据错误!\n");
}
printf("%f\n",z);
}