How does (a/b) work when both 'a' and 'b' are pure integers ?
4
-5
Why is it -5 ? I expect it to be -4 ? Because, in C/C++, 9/2 is 4 and
so negative of it, (-9/2) is -4.
What should I do to get C-like behavior ?
>(9/2)
>(-9/2)
Why is it -5 ? I expect it to be -4 ? Because, in C/C++, 9/2 is 4 and
so negative of it, (-9/2) is -4.
What should I do to get C-like behavior ?
Comment