educative.io

There is a problem with the example

10 % 7 need to be 3
But in the example I got 2

Hi,

In the example, the % (mod) operator is not being used the & operator is being used hence the answer you are getting is 2. The line A %= B will give you 3.

What is the meaning of & operator as in arithmetic

hello Regina,

could you define this compound assignment operator (&=) how it works? to get 2 from A &= B

Thanks in advance