?
Solved

commissions

Posted on 1998-03-10
3
Medium Priority
?
424 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 600 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

762 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