Hi, i have been trying to do the following problem for homework, ialthough i have been able to input some code using the psuedocode given to me im am completely stuck now, and i was wondering if anyone could show me what i am missing?
Question
Use a single-subscripted array to solve the following problem. A company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9 percent of their gross sales for that week. For example, a salesperson who grosses $5000 in sales in a week receives $200 plus 9 percent of $5000, or a total of $650. Write a program (using an array of counters) that determines how many of the salespeople earned salaries in each of the following ranges (assume that each salesperson’s salary is truncated to an integer amount):
1. $200-$299
2. $300-$399
3. $400-$499
4. $500-$599
5. $600-$699
6. $700-$799
7. $800-$899
8. $900-$999
9. $1000-over
1. #include <iostream>
2.
3. using std::cout;
4. using std::cin;
5. using std::endl;
6. using std::ios;
7.
8. #include <iomanip>
9.
10. using std::setw;
11. using std::setiosflags;
12. using std::setprecision;
13.
14. void wages( int [] );
15. void display( const int [] );
16.
17. int main()
18. {
19. variable declarations
20. int salaries [ 11 ] = { 0 };
21.
22. wages( salaries );
23. display( salaries );
24.
25. return 0;
26.
27. }
28.
29.
30. void wages ( int money[] )
31. {
32.
33. double sales,
34. commissionRate = 0.09
35. salary,
36.
37.
38.
39.
40.
41. do
42. {
43. cout << "Enter employee gross sales ( -1 to end )" << endl;
44. cin >> sales;
45. } while(sales >= 0);
46.
47. }
48. }