int p = 13;
int r = (p % 10);
into my code it gives me r == 3 which is what I would expect. But when I put:
int p = -3;
int r = (p % 10);
it gives me -3!. And not 3 like I would expect and I want.
I see from the MSDN examples that this is the way it should be. But why In math when you take (-3 % 10) I'm pretty sure you get 3.
Just curious. And looking for a method that transforms negative values into positive. I've tried int q = [r], but that didn't work.