The MotorSales Company has 15 employees. The employees have an annual sale that usually
takes place in the last quarter of the year which includes October, November and December.
MotorSales has requested that you write a program that will help the user to calculate the
employees’ bonuses during the months of October, November and December. The program
should also display the total monthly sale, bonus amount, and each employee’s unique ID as
indicated in the table below. It should also display the bonus paid to all employees. The bonus
rate should be 15% if the employee has a total monthly sale of at least 7000; otherwise the
bonus rate should be 10%. Furthermore, the program should determine and display the lowest
sales amount during the month of December. The program should read all the values from the
keyboard. Display the employee’s unique number, total monthly sales and bonus amount in the
form of a table.
The MotorSales Company has 15 employees.
The employees have an annual sale that usually takes place in the last quarter of the year
which includes October, November and December.
MotorSales has requested that you write a program that will help the user to calculate the
employees’ bonuses during the months of October, November and December.
The program should also display the
total monthly sale,
bonus amount,
and each employee’s unique ID
as indicated in the table below. // <--- Where is the table?
It should also display the bonus paid to all employees.
The bonus rate should be 15% if the employee has a total monthly sale of at least 7000;
otherwise the bonus rate should be 10%.
Furthermore, the program should determine and display the lowest
sales amount during the month of December.
The program should read all the values from the keyboard.
Display the employee’s unique number,
total monthly sales and bonus amount
in the form of a table.
I'm pretty sure the only code this user has ever produced has just been copied from the internet. And you can tell from the line-widths of the OP that the text is just copied from a PDF.
What C++ have you learned in the past two months? Show us what you've tried.
Here is a tutorial on arrays: http://www.cplusplus.com/doc/tutorial/arrays/
If you be more specific in where you are struggling (specific code that doesn't work), you'd get better help.
So now that we have pinned all that down what are you going to do with the information?
All the info is integers, so a start might be to get them into an array-system - 4 parallel in arrays, a 2D array or even <vector>(s), <tuple>s if you are a relational database person, <map>s with ID as a key might be the way to go with all of these except maybe for the first two with a struct/class to encapsulate the items.
And if arrays are your stumbling block, then build on the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include <iostream>
usingnamespace std;
int main()
{
int nockson_array[]{4, 5, 6};
int size = sizeof(nockson_array)/sizeof(int);
int total =0;
for(int i = 0; i < size; i++)
{
total = total + nockson_array[i];
}
cout << "The total of the " << size << " items is " << total << endl;
return 0;
}
The total of the 3 items is 15
Program ended with exit code: 0