Question: 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
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
