Why does 24 % 7 = 4? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Why does 24 % 7 = 4?

Why does 24 % 7 = 4? Is this because it rounds up?

19th May 2017, 9:41 AM
Corey
Corey - avatar
2 Réponses
+ 12
% operator returns the remainder. As 24 = 7 * 3 + (3), the answer should be 3.
19th May 2017, 10:02 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
- 1
I think thats why, am i correct?
19th May 2017, 9:42 AM
Corey
Corey - avatar