PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I was trying (long explanation as to why) to find out all the possible combinations to get below 9.5 but above 8.5 as the final grade of a course that consists on three tests, two quizes and extra points if you get 10 or more on each test (0.5, 0.5 and 1 extra point respectively).... I tried this very simple algorithm but for odd reason the highest grade its 18, not 20..... it appears to not be adding the extra 0.5s and 1... any help appreciated.
It is difficult for me to understand the problem you are trying to solve as you've explained it. Regardless, you should determine for yourself if this is a PHP code problem, or a flaw inherent in the algorithm you've implemented. If the latter, you can step through your algorithm with well placed echo statements to better discover where things are going awry. Best of luck!