I have a project I am working on where I am measuring the width of 25 wooden boards and loading them into an array. Now what needs to be done at this point is lets say I need to pick out of the array the boards whose measurements would make a panel 18 inches wide.
I've got some ideas where I would take an average of the boards in the array then sum all the boards in the array. At that point calculate the difference between the sum and the 18 inches. Then take the difference divide it by the average and throw the result(boards) out of the array. Re-sum the array and see if it is at 18.
I was wondering if anyone had a better way to do this or if C++ Builder might have something that I don't know about to help me out.
Thanks,
kiddjr
I've got some ideas where I would take an average of the boards in the array then sum all the boards in the array. At that point calculate the difference between the sum and the 18 inches. Then take the difference divide it by the average and throw the result(boards) out of the array. Re-sum the array and see if it is at 18.
I was wondering if anyone had a better way to do this or if C++ Builder might have something that I don't know about to help me out.
Thanks,
kiddjr