+ 1

What is module? Que es mĂłdulo?

7th Jan 2018, 7:23 PM
Firewhip
2 Answers
+ 2
7%2 = 7 modulo 2 = What is left when you divide 7/2 (integers can not be 3.2 or 3.7, must be 3 or 4...). 7/2=3, 1 is left. result of modulo=1.
7th Jan 2018, 8:38 PM
Lucien
Lucien - avatar
+ 1
If you are talking about this: int x = 5; int y = 3; System.out.println(x%y); Then I can explain this. You divide 5 by 3. You get 1 as an integer and 2 left. 2 is your answer.
7th Jan 2018, 7:36 PM
Hayk Sargsyan
Hayk Sargsyan - avatar