Cindy uses the services of a brokerage firm to buy and sell stocks. The firm cha
ID: 668514 • Letter: C
Question
Cindy uses the services of a brokerage firm to buy and sell stocks. The firm charges 1.5% service charges on the total amount for each transaction, buy or sell. When Cindy sells stocks, she would like to know if she gained or lost on a particular investment. Write a program that allows Cindy to input the number of shares sold, the purchase price of each share, and the selling price of each share. The program outputs the amount invested, the total service charges, amount gained or lost, and the amount received after selling the stock.
Perform an analysis and design for this problem. Write the code, compile and test it.
Write from the perspective of a beginner program and in C++ format