Question: TECH 1211 Computer Programming Program 10 Loops Compute Commission Total for Several Stock Trades When stocks are sold or purchased through a broker, the brokers

TECH 1211 Computer Programming Program 10 Loops Compute Commission Total for Several Stock Trades

When stocks are sold or purchased through a broker, the brokers commission is often computed using a sliding scale that depends upon the value of the stocks traded. Lets say that a broker charges the amounts shown in the following table: Transaction size Commission rate Under $2,500 $30 + 1.7% $2,501-$6,250 $56 + 0.66% $6,251-$20,000 $76 + 0.34% $20,001-$50,000 $100 + 0.22% $50,001-$500,000 $155 + 0.11% Over $500,000 $255 + 0.09$

The minimum charge is $39.

The user will be asked to enter the number of shares and the price per share for a particular stock. The program will then compute the size of the transaction (or value of the trade) for that stock and the corresponding commission rate. Add a loop so that the user can enter more than one stock trade and the program will calculate the commission on each and total commission for all the trades.

Design the loop so the user can make as many trades as he wants and indicates he is finished by entering a value of trade (or transaction size) of zero. You can start with the broker.c example program provided in the class notes.

Output: Your output should look like the following:

Print, Save and upload to ecourseware using file name YourLastName_YourFirstName_Program_10_Loop_Total_Commission.c

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!