Write a program to input cost price and selling price of an article and display profit or loss percent.
Answers
Answered by
1
Explanation:
profit = s.p - c.p
loss = c.p - s.p
Answered by
0
cp, sp = [float(i) for i in input().split()]
if sp>cp:
print(f"The Profit Percent is {round((sp-cp)*100/(sp+cp),2)}%")
else:
print(f"The Loss Percent is {round((cp-sp)*100/(cp+sp),2)}%")
Similar questions