I am trying to initialize a variable "amount" for the following conditions:
For the first 500 trillion grubnicks in sales, the company will be extended 20% of the amount of those sales in credit.
In addition, for the next 400 trillion grubnicks in sales (beyond the initial 500 trillion), the company will be extended additional credit equal to 10% of those additional sales. However, if the company's industy is phishing or mud (so spelled, entirely in lower case), the amount of this additional credit is 15% of those additional sales instead of 10%.
In addition, further credit will be extended in the amount of 3% of sales above 900 trillion grubnicks.
If a company's annual sales are at least 700 trillion grubnicks, then the credit line is further increased by 0.01 trillion grubnicks for every employee.
I already have variables for employees, industry and sales but I am struggling to initialize this variable because of the second condition. This is what I have so far:
1 2 3 4 5 6 7 8
|
double amount;
cout.setf (ios::fixed);
cout.setf (ios::showpoint);
cout.precision (2);
if (sales <= 500)
amount == 0.20 * sales
else if
|