Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

help in C++ Write a program that reads in two values, the first representing the number of shares of stock and the second representing the

help in C++

image text in transcribed

Write a program that reads in two values, the first representing the number of shares of stock and the second representing the price per share. Your program should calculate the following: - cost of the stock before commission - the stockbroker's commission (assume the stockbroker receives 2% commission) - the total cost of the stock purchase (including commission) Program requirements: - Include proper comments in your code - Include a constant named COMMISSION_RATE and assign it the value of 2% - Use a single cin statement to read in the number of shares and the price per share - Hint: cin numberofshares pricePershare; Figure 1: (sample input) Figure 2: (sample output for the given input above)

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

More Books

Students also viewed these Databases questions

Question

a neglect of quality in relationship to international competitors;

Answered: 1 week ago