Home > Back-end >  Some department stores have discount activity, the higher the consumption amount (p), (d), the great
Some department stores have discount activity, the higher the consumption amount (p), (d), the great

Time:03-24

# include & lt; stdio.h>
Int main ()
{
Float p, d;
Printf (" please enter the amount of consumption: ");
The scanf (" % f "& amp; P)
If (p<1000)
D=0;
Else if (p<2000)
D=1000 * 5%;
Else if (p<5000)
D=;
Else if (p<10000)
D=;
The else d=;
Discount rate: printf (" % f % % \ n real payment: %, 2 f \ n ", d * 100, p - p * d);
return 0; }


This is where is wrong, I can't run
  • Related