题解 | #网购#
网购
https://www.nowcoder.com/practice/5d7dfd405e5f4e4fbfdff6862c46b751
#include <stdio.h> int main() { float price ; int month , days , y; scanf("%f %d %d %d",&price , &month , &days , &y); if(month==11 && days==11 && y==1) price = price * 0.70 - 50; else if(month==11 && days==11) price = price * 0.70; else if(month==12 && days==12 && y==1) price = price * 0.80 - 50; else if(month==12 && days==12) price = price * 0.80; if(price > 0 ) { printf("%.2f\n",price); } else { printf("0.00\n"); } return 0; }