Suppose we have a two stock portfolio. What would the algorithm look like?
Get the number of shares for the first stock
Get the selling price for the first stock
Get the purchase price for the first stock
Print the data values for the first stock
Compute the cost for the first stock
Compute the value for the first stock
Get the number of shares for the second stock
Get the selling price for the second stock
Get the purchase price for the second stock
Print the data values for the second stock
Compute the cost for the second stock
Compute the value for the second stock
Compute the profit
Print the result