题解 | #网购#
网购
https://www.nowcoder.com/practice/5d7dfd405e5f4e4fbfdff6862c46b751
#include <stdio.h> int main() { int month,day,fact; double price; scanf("%lf %d %d %d",&price,&month,&day,&fact); if(month==11&&day==11) { price=price*0.7; if(fact==1) price=price-50; } else if(month==12&&day==12) { price=price*0.8; if(fact==1) price=price-50; } if(price<0) price=0.0; printf("%.2lf",price); return 0; }