To accept cost price and selling price and display profit or loss amount with percentage too.



Answer: -
Step 1: Start
Step 2: Accept cost price and store in CP
Step 3: Accept selling price and store in SP
Step 4: CP greater than SP
            If Yes: Calculate profit and store in Profit
                        Calculate profit percentage and store in ProfitPer
                        Display “Profit “Profit
                        Display “Profit Percentage “ProfitPer

            If No: Calculate Loss and store in Loss
                        Calculate Loss percentage and store in LossPer
                        Display “Loss “Profit
                        Display “Loss Percentage “LossPer
Step 5: End

Comments

Post a Comment

Popular posts from this blog

To accept marks of five subject and display pass or fail ( if pass display Percentage too).

To accept two numbers and display their sum, product, difference, division.