Question: 1.) First the program algorithm (without c++) is needed. 2.) Then the C++ Source code is needed. Thank you for the help. Summary Cindy uses

1.) First the program algorithm (without c++) is needed.

2.) Then the C++ Source code is needed.

Thank you for the help.

Summary

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.

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

Formulas:

Profit = AmtReceived - AmtInvested

AmtReceived = (NumOfShares * SalePrice) - Sale fee

AmtInvested = (NumOfShares * PurchasePrice) + Purchase fee

Sale Fee = (NumOfShares * SalePrice) * Fee percent

Purchase fee = (NumOfShares * PurchasePrice) * Fee percent

*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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!