0 % 3 = 0; 1 % 3 = 1; 2 % 3 = 2; 3 % 3 = 0; Did you see what it did? atAt the last step it went back to zero. This This could be used in situations like:
toTo check if N is divisible by M (eg:for example, odd or even.) or N is a multiple of M.
toTo put a cap of a particular value. inIn this case 3.
toTo get the last M digits of a number -> N % (10^M).