+ 4

Why does division of 0 crash your program and C#?

The title says it all.

26th Feb 2018, 4:36 AM
Neeron Bhatta
Neeron Bhatta - avatar
3 Respostas
+ 5
because zero shows the absence of value and dividing by nothing is like infinity
26th Feb 2018, 5:03 AM
᠌᠌Code X
᠌᠌Code X - avatar
+ 18
bcz it is undefined
26th Feb 2018, 5:04 AM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 4
Use exception handling, like this: catch (DivideByZeroException e) { Console.WriteLine("Cannot divide by 0"); https://www.sololearn.com/learn/CSharp/2690/
26th Feb 2018, 5:01 AM
Paul
Paul - avatar