Mod Intro
Modulo Operator
Division between two integers doesn't always result in another integer. The division
![image.png](https://steemitimages.com/640x0/https://cdn.steemitimages.com/DQmUEhXEj3o9iJcbFByRaKCsx4g4b2yJ9DtJKiR2cvpvnTn/image.png)
left a remainder of 4.
![basic.png](https://steemitimages.com/640x0/https://cdn.steemitimages.com/DQmUznKTh6A5JwJN5CQvtQg4GWrc1EwsxHYSLtNSzNF2Zr1/basic.png)
"mod" (contained on the image above, very sorry for night mode viewers) _is an operation that returns a remainder of a division. It stands for modulo operator. The division above can be written with modulo operator into
![image.png](https://steemitimages.com/640x0/https://cdn.steemitimages.com/DQmNMqy5oupWFjNaHSP4hYNwShzDzmeusCb38epY1mc7hmd/image.png)
Given integer a and other integers b, k, and m that satisfy
![image.png](https://steemitimages.com/640x0/https://cdn.steemitimages.com/DQmUqyww4RbEevMnp78HzNF7JSDMyJQE2f1sKFfj6peYAG5/image.png)
equation above can be written using modulo operator into
![image.png](https://steemitimages.com/640x0/https://cdn.steemitimages.com/DQmctPC1GJ8fwz1M7zbNz7Ac1YosRPQ1neusz2xiHR1Ybvh/image.png)
Examples :
(v)
Sort: Trending
Loading...