i. Average sales for each staff
ii. Average sales for each quarter
iii. Average sales for a year
iv. Total sales for each staff
v. Total sales for each quarter
vi. Total sales for a year

The sales performance is given in Table 1.

                    Table 1.

Staff ID Quarter1 Quarter2 Quarter3 Quarter4
100802 5500 7000 5500 6800
100888 4800 6700 7000 6500
100188 6890 2000 3500 2500
100189 4000 5000 5500 6000
100800 1210 4000 8000 8000
100122 8000 12000 14000 10000

Recommended Answers

All 3 Replies

...

how to calculate average sales for each staff?
two-dimensional array

How would you do it by hand? That's a good first step in defining an algorithm.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.