Question: C programming loop When stocks are sold or purchased through a broker, the broker's commission is often computed using a sliding scale that depends upon

 C programming loop When stocks are sold or purchased through a C programming loop

When stocks are sold or purchased through a broker, the broker's commission is often computed using a sliding scale that depends upon the value of the stocks traded. Let's say that a broker charges the amounts shown in the following table Transaction size Under $2,500 S2,501-S6,250 S6,251-S20,000 $20,001-$50,000 $100 +0.22% $50,001-S500.000 $155 +0.11% Over $500,000 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 followin Commission rate $30+ 1.7% $56 + 0.66% $76 0.34% $255 0.09S ling today nter the price per s nter the nunber of shares180 onnission for stock 1: $75-88 Enter the price per share: 28 nter the nunber of shares1 888 onnission for stock 2: $144.80 Tetal Conniss ion for all stocks traded: $219.88 rocess exited after 13.7 seconds vith return value a ress any key to continue

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!