Solved

commissions

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
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…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops 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.

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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now