Im confused about last part here that says " Set remainder equal to the remainder of 11 divided by 3 using the remainder (%) operator. ". Can someone explain this a bit more clear? If we put the answer as 11 % 3 its still accepted but what does 3 have to do with 2 and vice versa here? Do we use remainder operations only with number 2 or we can use any number?
11 is not evenly divisible by 3.
11 equals 3 + 3 + 3 + 2.
11 divided by 3 can be expressed either as 3.6̅6 or as 3, with a remainder of 2.
% operator is an arithmetic operator (like
/, etc) which returns the remainder of the number on the left divided by the number to the right.
11 % 3 returns