题解 | #网购#
网购
http://www.nowcoder.com/practice/5d7dfd405e5f4e4fbfdff6862c46b751
#include <stdio.h>
int main()
{
float value;
int mon, day ,count;
scanf("%f %d %d %d", &value, &mon, &day, &count);
if (mon == 11 && day == 11)
{
value = 0.7 * value;
}
if (mon == 12 && day == 12)
{
value = 0.8 *value;
}
if (count ==1)
{
value -= 50;
}
if (value < 0)
{
value = 0;
}
printf("%.2f", value);
return 0;
}