Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This is absolutely clever but I think it can be hard to read. Also, I think you could have added constants so you don't end up with magic numbers that the next person won't know what they're for.
Because we are dealing with integers, C# division or modulus by zero already throws a DivideByZeroException. There's no need to explicitly build and throw one. If we were using floats or doubles, we would get one of the infinities (or in the case of 0.0 / 0.0 or 0.0 % 0.0, NaN) as a result and would need to do further work to handle that.
For c# this solution actually includes the dividebyZeroException that was asked