题解 | #网购#
网购
https://www.nowcoder.com/practice/5d7dfd405e5f4e4fbfdff6862c46b751
#include <stdio.h> int main() { float price = 0; int month = 0; int data = 0; int c = 0; scanf("%f %d %d %d", &price, &month, &data, &c); //双十一 if(month==11 && data==11) { price = price*0.7-c*50; } //双十二 else { price = price*0.8-c*50; } if(price<0) { printf("0.00\n"); } else { printf("%.2f\n", price); } return 0; }