Computer Science, asked by cloudgaming201, 20 days ago

WAP to input SP and CP and calculate to print the profit or loss percentage

Answers

Answered by Ayeshasinha844503
0

cp=int(input("Enter the Cost Price:"))

sp=int(input("Enter the Selling price:"))

if cp>sp:

l=cp-sp

lp=l/cp

lop=lp*100

print("Loss percent: ",lop)

elif cp<sp:

p=sp-cp

pp=p/cp

pop=pp*100

print("Profit percent: ",pop)

else:

print("There is neither profit nor loss.")

Hope this helps you

Have a great day

Similar questions