Friday, July 31, 2015

17. Stock Transaction Program

The number of shares that Joe purchased was 1,000.
• When Joe purchased the stock, he paid $32.87 per share.
• Joe paid Im stockbroker a commission that amounted to 2% of the amount he paid
for the stock,
Two weeks later Joe sold the stock.
• The number of shares that Joe sold was 1,000.
• he  sold the stock for $33.92 per share.
• he paid his Stockbroker another commission that amounted to 2% of the amount he

received for the stock.

Write a program that displays the following information:
• The amount of money Joe paid for the stock.
• The amount of commission Joe paid his broker when he bought the stock.
• The amount that Joe sold the stock for.
• The amount of commission Joe paid his broker when he sold the stock,
• Display the amount of profit that Joe made after selling his stock and paying the two
commissions to his broker. (If the amount of profit that your program displays is a
negative number, then Joe lost money on the transaction.)

OMG my eyes hurt from staring at this screen. Warping up for today. Last program!!



No comments:

Post a Comment