pls i need help asap for my exam

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.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* 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>
using namespace 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;
}
thank you very much
Topic archived. No new replies allowed.