Tuesday, 19 April 2011

Dividing by zero

Dividing by zero error message in C#
Dividing by zero in maths gives an 'undefined' answer or infinity as the answer.

When you divide by zero in C#, the program crashes.

I wondered if dividing zero by zero would make the same error, and yes, it does. I thought 0/0 = 0, since logically it's true. But no, I'm wrong.

No comments:

Post a Comment