zhouying23 发表于 2017-5-2 12:08:24

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

引用

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.
页: [1]
查看完整版本: Division and modulo in C/C++, Java and Python