Mod Intro

in furl •  4 months ago  (edited)

Modulo Operator

Division between two integers doesn't always result in another integer. The division

image.png

left a remainder of 4.

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

Given integer a and other integers b, k, and m that satisfy

image.png

equation above can be written using modulo operator into

image.png

Examples :

image.png (v)

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
Loading...