modulo (%)
The modulo operation:
divdend % divisor = remainderdivident mod divisor = remaindera % 1is always 0 becausea / 1 = aa % ais always 0 becausea / a = 1a % 0is not defined becausea / 0is nota % b = cwhere c will always in [0,b) when a > ba % b = awhen b > a- "b divides a zero times, so everything remains"
You can check if something is odd by seeing if it is divisible by 2: n % 2 != 0
TODO: Examples and clever use:
- clock
- circular arrays (buffer)