C++ LANGUAGE!!!! Write a program to calculate stock transaction. The program will ask the user to enter the follow information: The name of the share purchased The number of shares purchased The price per share purchased the price per share sold In this question, we assume the user sold all the shares purchased. The user will pay the stockbroker a commission that amounted to 2% of the amount he/she paid for the stock when the user purchased the stock. The user will pay the stockbroker another commission that also amounted to 2% of the amount he/she paid for the stock when the user sold the stock. Then the program will calculate the following: the amount of money paid for the stock for the stock purchase the amount of commission paid to the broker for stock purchase the total amount of money paid for the stock purchase transaction the amount of money sold for the stock the amount of commission paid to the broker for stock sale the total amount of money the user got for stock sale after paying the commission the net profit after selling the stock and paying two commissions to the broker Solution // C++ code #include #include #include #include #include #include #include // std::setprecision using namespace std; int main() { double brokersCommission = 0.02; // Broker commission rate string name; double number, pricePurchased, priceSold; cout << \"Enter name of the share purchased: \"; getline(cin , name); cout << \"Enter number of shares purchased: \"; cin >> number; cout << \"Enter price per share purchased: \"; cin >> pricePurchased; cout << \"Enter price per share sold: \"; cin >> priceSold; double purchaseAmount = number * pricePurchased; double purchaseCommission = purchaseAmount * brokersCommission ; double totalAmountPaid = purchaseAmount + purchaseCommission; double stockSaleAmount = number * priceSold; double sellingCommission = (number * priceSold) * brokersCommission; double totalAmountRecieved = stockSaleAmount - sellingCommission; double netProfitLoss = totalAmountRecieved - totalAmountPaid; cout << \"\ The amount of money paid for the stock for the stock purchase: \" << purchaseAmount << endl; cout << \"The amount of commission paid to the broker for stock purchase: \" << purchaseCommission << endl; cout << \"The total amount of money paid for the stock purchase transaction: \" << totalAmountPaid << endl; cout << \"The amount of money sold for the stock: \" << stockSaleAmount << endl; cout << \"The amount of commission paid to the broker for stock sale: \" << sellingCommission << endl; cout << \"The total amount of money you got for stock sale after paying the commission: \" << totalAmountRecieved << endl; cout << \"The net profit after selling the stock and paying two commissions to the broker: \" << netProfitLoss << endl; return 0; } /* output: Enter name of the share purchased: Nifty Enter number of shares purchased: 1000 Enter price per share purchased: 32.87 Enter price per share sold: 33.92 The amount of money paid for the sto.