I need help with one question. I\'m really lost on this. Here it is: Cindy uses
ID: 3648888 • Letter: I
Question
I need help with one question. I'm really lost on this. Here it is: Cindy 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 Cindy sells stocks, she would like to know if she gained or lost on a particular investment. Write a program that allows Cindy 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. Is there a shorter way to code it? I found the solution here on Chegg, but I want a short version of it.Explanation / Answer
#include #include using namespace std; main() { float in,out,temp; int i,j; printf("shares sold "); cin>>i; coutin; coutout; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.