plz answer this question
NO SPAM
Attachments:
Answers
Answered by
1
//to calculate the selling price
class price
{
void method(int mp)
{
int d=0;
double sp=0;
if(mp>=1 &&mp<=2000)
d=0;
else if(mp>=2001 && mp<=5000)
d=4;
else if(mp>=5001 && mp<=7500)
d=8;
else
d=10;
sp=mp-(mp*d)/100.0;
System.out.println("MARKED PRICE "+mp);
System.out.println("SELLING PRICE "+sp);
}
}
Similar questions