Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

More Books

Students also viewed these Databases questions

Question

3 How supply and demand together determine market equilibrium.

Answered: 1 week ago