If I put 7%28, the result is 7. How come? Is it because 7 is a smaller int number than 28? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

If I put 7%28, the result is 7. How come? Is it because 7 is a smaller int number than 28?

16th Feb 2019, 8:07 AM
Lannidya Putri
Lannidya Putri - avatar
3 Respostas
+ 3
yes, itā€™s just 7 = 28 * 0 + 7
16th Feb 2019, 3:54 PM
n^4
+ 2
The % operator gives the remainder of any number so that's why you have 7 as the answer
16th Feb 2019, 10:04 AM
eMBee
eMBee - avatar
0
I got it. Thx a lot..
16th Feb 2019, 8:36 PM
Lannidya Putri
Lannidya Putri - avatar