0

What is Zero division Error?

I want to know it in Details with Many example. I am not getting the point .Please Share me what is it and What kind off problem it is and How I can Solve them .

24th Dec 2017, 8:16 PM
Khandaker Tanvir
1 Answer
+ 4
It links to the mathematical problem of dividing a number by zero. The best you can say, the result is 'undefined', but as such, the situation can be handled differently in different languages and/or programming implementations. Usually, an attempt of such operation is not allowed and raises an exception (error message). Sometimes the error is caught and an 'undefined' type of value is returned. What you can do to solve it? Make sure the variable you would like to divide by is never equal to zero. Or explicitly catch this error and proceed with your code runtime.
24th Dec 2017, 8:55 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar