Question: Write a program that caiculates the gains/losses generated by a stock investment after buying and selling shares on the stock market through the iTrade online

Write a program that caiculates the gains/losses generated by a stock investment after buying and selling shares on the stock market through the iTrade online broker platform. The program should prompt the user for: Company name and symbol. Number of shares transacted. Cost per share at the time of buying. Price (market value) per share at the time of selling. It will then calculate the gains/losses generated, considering that iTrade charges a 2% commission per trade. It should display a report that summarizes the stock transaction showing: Total cost. Total proceeds. Commission paid. Gains/Losses (amount and percentage) Notes Define the iTrade commission percent as a constant. The Text version of the Uutput sample ior uie oluun miveemanm.. m.man. Grading Rubric
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
