Solved

commissions

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

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…
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 how to create, access, and change arrays 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.

867 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

24 Experts available now in Live!

Get 1:1 Help Now