Solved

commissions

Posted on 1998-03-10
3
423 Views
Last Modified: 2012-06-27
This is for q2guo for helping me out with resevation program.

A company pays its salespeople on a commission basis. The salepeople recerve $ 200 per week plus 9 % of their gross sales for that week. 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 salesperson's salary is truncated to an integer amount):
1. $200-299
2. $300-399
3. $400-499
...........
...........
8. $900-999
9. $1000 and over

I am not asking for answer, just give me any hints.
thanks
0
Comment
Question by:robertlee031098
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
q2guo earned 150 total points
ID: 1257654
what you can do is create an array of 9 integers
array counter[9];

Assume you have an array of structures containing salespeople's records.  You would setup a loop to go through the entire salespeople's record, calucate their actually salaries and compare it to the above 9 ranges, then increase the appropriate counters.  
This should give you a general idea, any specific question can be posted here for further help.

Thanks
0
 

Author Comment

by:robertlee031098
ID: 1257655
To q2gou:

I really appreciate, now I know how to do it. I'll ask for further help if any problems are encountered again.
0
 

Author Comment

by:robertlee031098
ID: 1257656
I don't know where my another 50pts gone, please give it back to Mr. q2guo

thanks
 
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question