Question: PLEASE COMPLETE USING C + + Cindy uses the services of a brokerage firm to buy and sell stocks. The firm charges 1 . 5
PLEASE COMPLETE USING C
Cindy uses the services of a brokerage firm to buy and sell stocks. The firm charges 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.
Instructions
Write a program that allows Cindy to input:
The purchase price of each share
The selling price of each share
The number of shares sold
The program outputs:
The total amount invested
The total amount received from selling
The total service charges
Amount gained or lost
An example program is shown below:
Enter the buying price of each share:
Enter the selling price of each share:
Enter the number of shares sold:
Total amount invested: $
Total amount received: $
Total service charges: $
Amount gained or lost: $
Since your program handles currency, make sure to use a data type that can store decimals.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
