0
7%2 explain
2 Answers
0
7%2 is 7 mod 2 , mod is operation finds the remainder after division
example 7%2 , the result of division is 7/2 = 3 and the remainder is 1
so 7%2 = 1
0
% (modulo) means that you will have to find the remainder. It's floor division but with an extra step.
7%2 means that you will first see how many times two goes into seven. Two goes into seven three times. Two times three is six. Next, you subtract seven minus six. Your remainder will be one because it's what's left. That's how the % (modulo) works.