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