New course! Every coder should learn Generative AI!
Try a free lesson0
What is 6%23
how?
4 Answers
+ 19
When you'll divide a smaller number by a larger number, the quotient will be 0 and the remainder will be the smaller number itself
6/23 = 0
6%23 = 6
+ 1
I think it's 6
+ 1
The answer is 6. This is because % returns the remainder, by saying 6/23 the whole part of the number is 0 because 6 contains number 23 zero times. For some reason this is hard to explain but lets say you are dividing 26 with 8 (this is just a random example).
26/8 = 3 //Because 26 holds the number 8 three times
26%8 = 2
26 - 3 * 8 = 2 //Therefore % returns the remainder during the division of these two numbers.
In the example you gave we have
6/23 = 0
6 - 0 * 23 = 6
0
how bro