0
I can't understand remainder portion, any one can help me?
5 Respuestas
+ 4
% operator returns the remainder of division. For example, when 5 is divided by 2, 2 is the quotient and 1 is the remainder (5 = 2 * 2 + 1).
5 % 2 = 1 is it's representation.
+ 3
Maybe if it would have been better if you could explain more.
+ 3
It returns a remainder:
E.g
1: 6%2 evaluates to 0 because there's no remainder if 6 is divided by 2 ( 3 times ).
2: 7%2 evaluates to 1 because there's a remainder of 1 when 7 is divided by 2 ( 3 times ).
0
how % function work... What it do?
- 1
If you have 3 apples, and there are 2 people. 1 apple remains.
3 % 2 = 1
1 apple is the Remainder.