Number problem

Let's talk about algorithms!

Moderator: Board moderators

Post Reply
New poster
Posts: 1
Joined: Mon Jun 11, 2012 2:56 pm

Number problem

Post by global_erp_solution » Mon Jun 11, 2012 3:07 pm

I have sorted 90 round numbers (greater than zero and less than 150 with 7 decimal precision) from the greatest all the way to the smallest. Now I have a problem on picking n numbers (4<=n<=10) from those 90 numbers where I must sort the product of those n numbers from the largest to the smallest. Any help?
example :
lets say now n=5, it's quite obvious that the first 5 numbers will yield the greatest product from the other 5 numbers within the 90-number data. but what about the next greatest, third greatest, 99th greatest, etc? how can I sort the n number-group that will yield the greatest product all the way to the smallest product?
remember that some of the numbers are smaller than 1 and greater than zero (which if included in the number group will make the entire group to yield smaller product).

Post Reply

Return to “Algorithms”