close
此文章來自奇摩知識+如有不便請留言告知
標題:
C++: (-17)%5 and 17%(-5)
發問:
我呢排學緊C++ 我知道cout
最佳解答:
The C++ standard requires that (a/b)*b + a%b == a, we can rearrange this to a%b == a-(a/b)*b. And that explains everything.5.6/4 [...] if the quotient a/b is representable in the type of the result, (a/b)*b + a%b is equal to a.
其他解答:6CC7293C79127CE5
文章標籤
全站熱搜
留言列表