Solved

commissions

Posted on 1998-03-10
3
422 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

Independent Software Vendors: 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

This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

730 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