Ahmed uses the services of a brokerage firm to buy and sell stocks. The firm
charges 1.5% service charges on the total amount for each transaction, buy
or sell. When Ahmed sells stocks, he would like to know if he gained or
lost on a particular investment. Write a program that allows Ahmed to input
the number of shares sold, the purchase price of each share, and the selling price of each share. The program outputs the amount invested, the total service charges, amount gained or lost, and the amount received after selling the stock.
1
Expert's answer
2013-03-12T12:29:28-0400
//Ahmed uses the services of a brokerage firm to buy and sell stocks. The firm //charges 1.5% service charges on the total amount for each transaction, buy //or sell. When Ahmed sells stocks, he would like to know if he gained or //lost on a particular investment. Write a program that allows Ahmed to input //the number of shares sold, the purchase price of each share, and the selling //price of each share. The program outputs the amount invested, the total //service charges, amount gained or lost, and the amount received after //selling the stock.
Comments
Leave a comment