#include <stdio.h>
int main(){
float price = 0;
int month, day, hasP = 0;
scanf("%f %d %d %d", &price, &month, &day, &hasP);
float cut = 0;
if(month == 11 && day == 11){
cut = 0.7;
}else if(month == 12 && day == 12){
cut = 0.8;
}
float pay = price*cut - 50*hasP;
if(pay <= 0){
printf("0.00");
}else{
printf("%.2f", pay);
}
}
int main(){
float price = 0;
int month, day, hasP = 0;
scanf("%f %d %d %d", &price, &month, &day, &hasP);
float cut = 0;
if(month == 11 && day == 11){
cut = 0.7;
}else if(month == 12 && day == 12){
cut = 0.8;
}
float pay = price*cut - 50*hasP;
if(pay <= 0){
printf("0.00");
}else{
printf("%.2f", pay);
}
}
2020-11-05
在牛客打卡8天,今天学习:刷题 5 道/代码提交 6 次
全部评论
相关推荐
12-06 17:39
中国石油大学(华东) 前端工程师
rbjjj:太杂了吧,同学,项目似乎都没深度,都是api调度耶,分层架构思想没有体现出来了,前端没有前端优化前端工程化体现,后端微服务以及分层架构没体现以及数据安全也没体现,核心再改改,注重于计算机网络,工程化,底层原理吧 点赞 评论 收藏
分享
11-19 17:27
门头沟学院 嵌入式软件开发 点赞 评论 收藏
分享

