How the value of -11%7 is calculated?

how the vlue of -11 % 7 = -4.Instead it shoud be 3

Actual value of -11 % 7 is 4.
When you do a % b , it means how much to reduce a so that it becomes divisible by b. Like when you do 11% 7 it comes to be 4 bcz if you reduce 4 from 11,it becomes divisible by 7.
So if u reduce 3 from -11, it becomes -14 thus divisible by 7

In first line you have written -11%7 =4 it should be -4?
I did not get the actual value concept.
I know that it shoud be 3 as 7*(-2)+3=-11 but the ans is -4 why?
is it like it neglects minus sign and calculates 11%7 which is equal to 4 and then adds a negative sign before.

Maybe u r not placing brackets so its calculating 11%7 and then placing negative sign.
If u write ((-11)%7),ans will be 3

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.