I was writing a code (I knew the output,In Java) , after compiling it giving the input i got a weird value.
Code Snippet -
long a,b,c;
a=-245436499;
b=992;
c=(a+b);
System.out.print(c%b);
And the Output it gave me was
-819
But when i calculated it on calculator, it was
173 \\why?