How to use the modulus operator at a number smaller than the other? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

How to use the modulus operator at a number smaller than the other?

If I want to use the modulus operator on 2 numbers, the first being smaller than the second, what do I get? Ex: 1 % 30

21st Apr 2021, 5:03 PM
Rzv19
2 Respostas
+ 2
You always get the smaller number as result, so there's actually no point in doing the modulus operation.
21st Apr 2021, 5:13 PM
XXX
XXX - avatar
0
Thanks
21st Apr 2021, 5:14 PM
Rzv19