知识点:

分支控制:分支控制

#include <iostream>
using namespace std;

int main() {
    float price = 0.0;
    int month = 0;
    int day = 0;
    int discount = 0;
    float money = 0.0;

    scanf("%f %d %d %d", &price, &month, &day, &discount);

    if (month == 11) {
        money = price * 0.7;
    } else {
        money = price * 0.8;
    }

    if (discount) {
        money -= 50;
    }

    if (money < 0) {
        money = 0;
    }

    printf("%.2f", money);

    return 0;
}