0
Operators
How does the modulo operator work like 20%6 and the ans is 2 how does the 2 come up
5 Answers
+ 6
total 20
3×6 = 18
20 -18 = 2
The remainder of 20/6 is 2
+ 3
% ---> remainder
+ 1
It's about remaining of division.
0
20/6 is 18 and 20-18 is 2 so it is the remainder of the division
Hot today
I have made a calculator in which my % (Percentage) not work correctly for 100%50 or 100%20.
2 Votes
Python palindrome challenge.
1 Votes
Java
0 Votes
Number of Ones ( C++ ) question!
1 Votes