|
-
Sep 22nd, 2005, 02:12 PM
#1
Thread Starter
Lively Member
Coding Help (only Ideas)
Lo all, Just need some general ideas on how to code something.
Right in the application im making I need to find the lowest 'paid' 20% of people in a certain group. i.e if there are 100 people in group 1 then 20 people (same as 20%) who are paid the lowest are in Band A, then the 20.1% - 39% of the lowest paid are in Band B.
The way how I thought of doing it would be to say sort through every person in the array and if they are in group 1 then add their serial/id number to another array, once the loop has found everyone in group 1 then sort that array in range of lowest to highest. Then..... lol divide the ubound of the array which is now sorted by 100 to get how many people per %. Mulitply that by 20 to get the 0 to 20% point on the array. next multiply the 1st number by 39 then add the 20% number as the starting point then the 39% as end point which gives then the 20% - 39% number lol.
Right thats how I though initially of doing it, any fast way people know of??
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|