ITeye博客

Division and modulo in C/C++, Java and Python

yaojingguo · 2013-12-19 12:58 · C/C++ · java · Python · 编程语言 · Markdown

a is an integer, n is a positive integer.

C/C++

quotient is rounded towards zero. a mod n = a - n (a/n)

Python

Same as defined by CRLS.

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。