I want to see this one .
Since division by 0 is undefined , the mod that relies on division is also undefined .
This is a division; It consists of an integral part and the remainder:
(X / D) = floor(X / D) + (X % D) / D
Regrouping, you will receive:
(X % D) / D = (X / D) - floor(X / D) (X % D) = D * ((X / D) - floor(X / D))
Substituting 0 for D :
(X % D) = D * ((X / 0) - floor(X / 0))
Since dividing by 0 is undefined :
(X % D) = D * (undefined - floor(undefined)) (X % D) = D * (undefined) (X % D) = undefined
Mateen Ulhaq Sep 10 2018-11-11T00: 00Z
source share