Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Last month Joe purchased some stock in Acme Software, Inc. Here are the details

ID: 3623200 • Letter: L

Question

Last month Joe purchased some stock in Acme Software, Inc. Here are the details of
the purchase:
• The number of shares that Joe purchased was 1,000.
• When Joe purchased the stock, he paid $32.87 per share.
• Joe paid his stock broker a commission that amounted to 2% of the amount he
paid for the stock.
Two weeks later Joe sold the stock. Here are the details of the sale:
• The number of shares that Joe sold was 1,000.
• He sold the stock for $33.92 per share.
• He paid his stock broker 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.)

Explanation / Answer

#include <iostream> #include<cmath> using namespace std; int main() { double shares_purchased = 1000,paid = 32.87,commision_purchased = 0.02; double shares_sold =1000,sold_paid=33.97,commisionreceived = 0.02; double totalpaid_purchase = (32.87 * 1000); double totalcommisiom_purchased = (0.02*totalpaid_purchase); double soldamout = (33.92*1000); double soldcommision = (soldamout*0.02); double profit = (soldamout - (totalpaid_purchase +totalcommisiom_purchased+soldcommision)); cout<<"The amount of money Joe paid for the stock is : $ " <<totalpaid_purchase; cout<<" The amount of commission Joe paid his broker when he bought the stock : " << totalcommisiom_purchased ; cout<<" The amount that Joe sold the stock for $ " <<soldamout; cout<<" The amount of commision Joe paid his broker when he sold the stock : " <<soldcommision; cout<<" Total Profit is: "<<profit; cout<<" He lost money on the transcation "; system ("pause"); return 0; }
I hope this will helps to You !