Write a program in BlueJ to find to accept the Cost Price of a mobile phone and find the Sell Price after giving discount as follows:
Price Discount%
Upto 10000 5
>10000 to 15000 10
>15000 to 20000 15
>20000 to 25000 20
>25000 to 45000 30
>45000 35
Print the Discount and the Sell Price.
Answers
Answered by
1
Answer:
cp=int(input("enter the cp"))
discount=0
sp=0
if cp<=10000:
discount=discount+(5/100*cp)
sp=cp-sp
elif (cp>10000)and(cp>=15000):
discount=discount+(10/100*cp)
sp=cp-sp
elif (cp>15000)and(cp<=20000):
discount=discount+(15/100*cp)
sp=cp-sp
elif (cp>20000)and(cp<=25000):
discount=discount+(20/100*cp)
sp=cp-sp
elif (cp>25000)and(cp<=45000):
discount=discount+(30/100*cp)
sp=cp-sp
else:
discount=discount+(35/100*cp)
sp=cp-sp
print("discount=", discount ,"sp=", sp)
Similar questions
Physics,
1 month ago
Social Sciences,
1 month ago
English,
2 months ago
India Languages,
2 months ago
English,
9 months ago
Math,
9 months ago
English,
9 months ago