Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C+++ program help Your program Assignment Write a Stock Commission program. If Kathryn bought 600 shares of stock at the price of 21.77 per share.

C+++ program help
image text in transcribed
Your program Assignment Write a Stock Commission program. If Kathryn bought 600 shares of stock at the price of 21.77 per share. She must pay her stock broker a 2 percent commission for the transaction. Write a program that calculates and displays the following. Allow input for the cost of the stock per share and the number of shares purchased. .The amount paid for the stock alone (without the commission). . The amount of the commission The total amount paid (for the stock plus the commission) Instead of 600 shares allow the use to input the number of shares and the price per share of the stock. Formatting Output: Be sure and use formatting such as setw), setprecision(), fixed, and showpoint. (Look ahead in chapter 3 for the discussion of Formatting Output) Example of output: he evust pay her stock brokea 2 perc t coniission fer the transaction. his is howh she should expect te pay. 00 shares $21.7 otal Stock Pricel 4354.e ress Total: ou nany shares will you he baying 125 at is the price per share? $53.27 hat percentage will your broker be paid? 3 or4 25 shares $53.27 teck Cost: otal Cost ave a nice dayt ress any key to cont inue 3 6658.7S 6858.51

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

Genomes And Databases On The Internet A Practical Guide To Functions And Applications

Authors: Paul Rangel

1st Edition

189848631X, 978-1898486312

More Books

Students also viewed these Databases questions