Single File Programming Question
Problem Statement
Ramu, a dedicated businessman who operates a cosmetic store, is seeking assistance to analyze the financial performance of his business. He is looking for a program that can help him determine the profit or loss for each cosmetic item he sells. Help him with a program.
Input format
- The first line of input consists of a floating-point number representing the cost.
- The second line of input consists of a floating-point number representing the selling price.
Output format
- If there is a profit, the output displays "Profit = " followed by the profit amount rounded to two decimal places.
- If there is a loss, the output displays "Loss = " followed by the loss amount rounded to two decimal places.
- If there is neither profit nor loss, the output displays "No profit or no loss".
Refer to the sample output for the formatting specifications.
Code constraints
- (0 \leq \text{cost price}, \text{selling price} < 10^7)
Sample test cases
Input 1
85.74
100.45Output 1
Profit = 14.71Input 2
72.06
66.88Output 2
Loss = 5.18Input 3
99.99
99.99Output 3
No profit or no loss