BC37 网购
#include<stdio.h>
int main()
{
double price = 0;//商品价格
int month = 0;
int day = 0;
int flag = 0;//flag表示有无优惠券
scanf("%lf %d %d %d",&price,&month,&day,&flag);
if(month==11 && day == 11)
{
price=price*0.7;
}
if(month ==12 && day ==12)
{
price =price *0.8;
}
price =price -50*flag;
if(price<0.0)
{
printf("%.2lf",0.00);
}
else
printf("%.2lf",price);
return 0;
}
https://blog.51cto.com/u_15460718/4839515
页:
[1]