Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started