Hi,
Need little help on my homework assignment. Let's say I have the information on three stocks which include stock name, buying price, current price, number of shares bought and and yearly fees.
I am supposed to calculate the following:
1. initial cost which is number of share * buying price
2. current cost, which is the number of shares * current price
3. profit, which is current_cost - initial_cost - yearly_fees
4. total profit = total + profit.
I also need have the program figure out how many of the three stocks are generating positive profit, negative profit or break even and print out the number of each.
Another requirement is to write with appropriate functions and paramenter passing (the reference/value stuff) and to use one void function and one function with return statement.
-------------------
I have completed assignment using only void functions, but wondering how to incorporate the return statement deal?