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

help in C++ Write a program that reads in two values, the

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!