#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 次
全部评论
相关推荐
面试中的本杰明很勇敢:华为19级已经驳回了18级台风,要求去公司很正常啊

点赞 评论 收藏
分享

点赞 评论 收藏
分享
09-23 17:25
华南理工大学 算法工程师 点赞 评论 收藏
分享