Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Read a disk file named SalesResult.txt that contains a list of sales amounts. Se

ID: 3622605 • Letter: R

Question

Read a disk file named SalesResult.txt that contains a list of sales amounts. See a sample of the file below.
Use a one-dimensional array to solve the following problem: A company pays its sales people on a commission basis. The sales people receive $200 per week, plus 9% of their gross sales for that week. For example, a sales person who grosses $5000 in sales in a week received $200 plus 9% of $5000, or a total of $650. Write a program (using an array of counters) that reads the data file and displays 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):
a) $200-$299
b) $300-$399
c) $400-$499
d) $500-$599
e) $600-$699
f) $700-$799
g) $800-$899
h) $900-$999
i) $1000 and over
-------------------------------------------------------------------------------
Sample data file
4385
8158
3684
1150
4710
3995
8311
602
7285
3632
3975
3139
1165

Explanation / Answer

#include using std::cout; using std::cin; int main() { int index; int salary; int grossSales=1; int salaryRange[10]; for (index = 0; index 1000) salaryRange[8] += 1; else salaryRange[index] += 1; } for (index = 0; index < 8 ; index++) cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote