Answer:
#include<iostream>
#include<conio.h>
using namespace std;
main()
{
int numberofshares;
float costpershare, amount;
costpershare= 25.625;
numberofshares = 400;
amount = costpershare*numberofshares;
cout<<"\nTotal amount of Stock Purchase =" << amount;
getch();
}
Explanation:
In above mentioned program, total amount of stock purchase need to be calculated for given data. The values 25.625 and 400 assigned to the variables of cost per share and number of shares.
The formula to calculate the total amount of stock purchase is simply Multiplication of cost and total number of shares. The output will be displayed with the help of variable named as amount.
Solution
Cost per Share = 25.625
Number of shares = 400
amount = cost per share * Number of shares
= 25.625 * 400
= 10,250