+ 1
I really don't understand the modulo operation at all . 😭 help please
4 Réponses
+ 5
The modulo operator is used to find the remainder of a number after the division of the 2 operands. For example:
x = 5%2
In the example, we're trying to find the modulus of 5 and 2. What's happening is the computer is first finding the division of the 2 operands, without decimals. This should result to 2 as 2 can fully go into 5 twice. Next, it finds the remainder from the result of the first operand, or in this case, 5. This should result in 1 as 5-4 is equal to 1.
Hope this helped!
+ 1
thanks sooooo muchhh ❤ it helps
0
hi everyone
0
this might help.
https://code.sololearn.com/cN4gPuhaXnbX/?ref=app