Mar-04-2019, 12:56 AM
It seems pretty evident from the error that you need to not divide by zero. Your code doesn't handle that case, and you need to change is to that it does. You can either check for zero before dividing by it or you can catch the exception - I would suggest the first option, as I try to keep exceptions to exceptional circumstances.