0
What is the module operator (x%y)?
I speak Spanish so when I saw this symbol % I thought it was per centage but then I saw an example and It wasn't the percentage...
5 odpowiedzi
+ 3
The modulo symbol (%), or the modulus, is an operator which yes, returns the remainder of an equation. For example:
100 % 10 = 0
50 % 7 = 1
7 % 4 = 3
One very popular and beginner way to use the modulus, is telling whether or not an integer is even or not.
x % 2 = 0
Means even
x % 2 = 1
Means odd
+ 1
It returns the remainder
+ 1
En español es el módulo.
0
ok thanks
0
Thank you very much Cohen Creber.