Profit and loss with pseudocode
Now that we have a fair understanding
of flowcharts and pseudocode, let us try
to implement the same profit and loss
problem using pseudocode.
Program starts
Read Cost Price (CP)
Read Selling Price (SP)
If (SP greater than CP) then
Profit = SP – CP
Print Profit
Else
Loss = CP – SP
Print Loss
Program ends
Getting started with block coding