Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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 $3000 in sales in a week receives $200 plus 9 percent of $3000, or a total of $470.

Write a C program (using an array of counters) that determines how many of the salespeople earned salaries in each of the following ranges (assume that each salespersons salary is truncated to an integer amount):

  • $200 299
  • $300 399 :
  • $900 - 999
  • $1000 and Over

A sample input/output dialog is shown below:

Enter employee gross sales (-1 to end) : 3000 Employee Commission is $470.00 Enter employee gross sales (-1 to end) : 1000 Employee Commission is $290.00 Enter employee gross sales (-1 to end) : 10000 Employee Commission is $1100.00 Enter employee gross sales (-1 to end) : 8000 Employee Commission is $920.00 Enter employee gross sales (-1 to end) : 200 Employee Commission is $218.00 Enter employee gross sales (-1 to end) : 7000 Employee Commission is $830.00 Enter employee gross sales (-1 to end) : -1 Number of employees in the salary range : $200 - $299 : 2 $300 - $399 : 0 $400 - $499 : 1 $500 - $599 : 0 $600 - $699 : 0 $700 - $799 : 0 $800 - $899 : 1 $900 - $999 : 1 Over $1000 : 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL/PHP Database Applications

Authors: Brad Bulger, Jay Greenspan, David Wall

2nd Edition

0764549634, 9780764549632

More Books

Students also viewed these Databases questions