Computer Science, asked by rishabhgaming03, 7 months ago

Write a program to input cost price and selling price of an article and display profit or loss percent.

Answers

Answered by Absoluteinspired
1

Explanation:

profit = s.p - c.p

loss = c.p - s.p

Answered by Kaushikkalesh
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