Question: Write a program that calculates the gainslosses generated by a stock investment afler buying and selling shares on the stock: market through the ifrade online

Write a program that calculates the gainslosses generated by a stock investment afler buying and selling shares on the stock: market through the ifrade online broker platform. The pregram should prompt the user for: Company name and symbol. Number of shares transected. Cost per share at the time of buying. Price (market value) per ahare at the time of seling. It wil then calculate the gainslosses generated, considering that iTrade charges a 2% commission per trade. It aheuld display a report that summarizes the stock transaction shewing: Tatal cost. Total proceeds. Commission paid. GaintLosses (amount and percentage) Notes Define the Irade commission percent as a constant Output Sample Define the ITrade commission percent as a constant. Output Sample
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
