#is this true or false 10%5 < 2

1 messages · Page 1 of 1 (latest)

wispy pollenBOT
#

<@&987246399047479336> please have a look, thanks.

wispy pollenBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

pulsar tundra
#

It looks like the first one is true. How come?

#

o

#

ok

#

no the remainder would be 1

#

if you subtract 2 from 5 as many times as you can before it becomes negative, u end up with 1.

#

5 - 2 = 3
3 - 2 = 1
1 - 2 = -1 (this is negative, so we go with the previous result: 1)

that's how you find the remainder (which is what the % operator does)

#

no problemo :D

wispy pollenBOT
#

Closed the thread.

pulsar tundra
#

wth lol what happened

gentle jackal
#

someone closed the thread, probably because the original message got deleted as well

#

but u reopened it now

#

in regards to the question, just try it out and see what happens

#

modulo works by doing division and then taking the remainder

#

so whats 10 divided by 5?

#

its 2. and whats the remainder? 0

#

so 10 % 5 is 0

pulsar tundra
#

craaaazy

pulsar tundra
gentle jackal
#

or deleted everything on their own

pulsar tundra
#

oh wow i wonder why they couldve been banned

gentle jackal
#

dont worry too much about it

pulsar tundra
#

o

#

it says theyre still here actually, very weird

#

they mustve just wanted it deleted

gentle jackal
#

just wanted to follow up, since u said the result is 1, but its 0

#

but yeah

#

at least the math in the title of the thread

pulsar tundra
gentle jackal
#

oke cat_thumbs_up

pulsar tundra
#

oh okok yeah i get u now