习题1-5

#include<stdio.h>
int main() {
    int n;
    scanf("%d", &n);
    double price;
    if (n*95<300)
    {
        price = n * 95;
        printf("%.2f\n", price);
    }
    else
    {
        price = n * 95 * 0.85;
        printf("%.2f\n", price);
    }
    return 0;
}

打折

猜你喜欢

转载自www.cnblogs.com/zhuzehua/p/9783203.html