So I thought that negative numbers, when mod\'ed should be put into positive space... I cant get this to happen in objective-c
I expect this:
-1 % 3
Not only java script, almost all the languages shows the wrong answer' what coneybeare said is correct, when we have mode'd we have to get remainder Remainder is nothing but which remains after division and it should be a positive integer....
If you check the number line you can understand that
I also face the same issue in VB and and it made me to forcefully add extra check like if the result is a negative we have to add the divisor to the result