#include<iostream.h>
void main()
{
int count;
int a;
double rate;
double cost;
cost=rate*count;
if((count>=1000)&&(count<2000));
a=1;
else if((count>2000)&&((count<3000);
a=2;
else if((count>3000)&&(count<5000);
a=3;
else if((count>5000);
a=4;
switch(a)
{
case 1:rate=0.95;break;
case 2:rate=0.9;break;
case 3:rate=0.85;break;
case 4:rate=0.8;break;
default:rate=1;break;
}
cost=count*rate;
}
void main()
{
int count;
int a;
double rate;
double cost;
cost=rate*count;
if((count>=1000)&&(count<2000));
a=1;
else if((count>2000)&&((count<3000);
a=2;
else if((count>3000)&&(count<5000);
a=3;
else if((count>5000);
a=4;
switch(a)
{
case 1:rate=0.95;break;
case 2:rate=0.9;break;
case 3:rate=0.85;break;
case 4:rate=0.8;break;
default:rate=1;break;
}
cost=count*rate;
}