i need some help

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.
Hello nockson,


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.


And your problem/question is??

EMPLOYEE UNIQUE ID OCTOBER NOVEMBER DECEMBER
1023 2800 895 4712
1024 2560 4700 685
1025 2010 3240 1593
1026 693 4520 4000
1027 569 6700 3257
1028 3500 790 6120
1029 1890 7120 4310
1030 2400 4533 750
1031 4590 1900 563
1032 2000 412 6152
1033 725 789 4006
1034 690 1490 2045
1035 1500 5000 712
1036 1006 4796 960
1037 863 3470 1006
1038 4900 3678 520
MY problem is that i still struggling to understand how to deal with array in c++
if someone can help me with the code
againtry yes is that
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.
Last edited on
againtry yes is that

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>

using namespace 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



Over to you ...
i still struggling to understand how to deal with array in c++

Another tutorial (multipart) on arrays: https://www.learncpp.com/cpp-tutorial/61-arrays-part-i/
Topic archived. No new replies allowed.