Answered step by step
Verified Expert Solution
Link Copied!

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: 13.23
Enter the selling price of each share: 14.00
Enter the number of shares sold: 43
Total amount invested: $ 577.423
Total amount received: $ 592.97
Total service charges: $ 17.5633
Amount gained or lost: $15.5466
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

0764532545, 978-0764532542

More Books

Students also viewed these Databases questions