Algorithm:
Step 1: Start
Step 2: Input cost price and selling price (cp, sp)
Step 3: If cp > sp Then
GoTo Step 4
Else if cp < sp GoTo Step 5
Else GoTo Step 6
Step 4: LP = ((cp – sp) / cp) * 100
GoTo Step 7
Step 5: PP = ((sp – cp) / cp) * 100
GoTo Step 8
Step 6: Print Neither Profit or Loss
GoTo Step 9
Step 7:Print Loss Percentage is : LP
GoTo Step 9
Step 8: Print Profit Percentage is : PP
Step 9: Stop/End
Flowchart:
