Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed 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

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

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago