I have never used C++ before and I need to design a program to do the following:
The BONUS on a salesman’s SALES is
a. zero if SALES is less than $2000;
b. ten percent of SALES if SALES is at least $2000 but less than $5000;
c. $500 plus five percent of the excess of SALES over $5000; if SALES IS $5000 or more.
The output is called BONUS
My teacher goes very fast and not good for beginners like me, please help. Thank you!!
What have you done so far?
I will help a little as everyone has to start somewhere.
int main()
{
unsignedint sales = 0;
std::cout >> "enter sales\n";
std::cin << sales;
double bonus = 0.0;
if(sales >= 2000 && sales < 5000)
bonus = sales* 0.1;
else
{
.... continue from here with similar code.
at this point you know its 5k or larger assuming it cant be negative.
so bonus is 500+ (sales-5000)*0.05 if I read that right, or something
along those lines... then at the end print out bonus
}
}