Write your question here.
i need to know th code of this
KATHRYN BOUGHT 600 shares of stock at a price of $21.77 pershare.A year later she sold them for just $16.44 per share. write a program that calculates and dispalay the ff.
*The total amount paid forthe stock
*the total amount recieved from selling the stock
*the total amount of money she loss
thats the question i need answer pls as soon as possible
Maybe you should actually start studying and working hard? Instead of leaving everything for the last second and then beg for someone to do the exam for you.
/* Write your question here.
i need to know th code of this
KATHRYN BOUGHT 600 shares of stock at a price of $21.77 pershare.A year later she sold them for just $16.44 per share. write a program that calculates and dispalay the ff.
*The total amount paid forthe stock
*the total amount recieved from selling the stock
*the total amount of money she loss */
#include <iostream>
usingnamespace std;
int main()
{
// KATHRYN BOUGHT 600 shares of stock at a price of $21.77 pershare.
int shares = 600;
float price = 21.77;
float revenue = 0;
// The total amount paid for the stock
float total = shares * price;
cout << "Total amount paid: $" << total << endl;
// the total amount recieved from selling the stock
// A year later she sold them for just $16.44 per share.
price = 16.44;
revenue = shares * price;
cout << "Revenue of sold shares: $" << revenue << endl;
// the total amount of money she loss
cout << "You made $" << (revenue - total) << " with your investments." << endl;
return 0;
}