Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何确定能被 4 整除的数?我正在尝试申请闰年。我看到很多显示“%”符号的解决方案。这是什么意思?
要检查一个数字x是否可以被任何其他数字整除y,您可以使用模运算符来获取除法的余数(应该是0)。
x
y
0
x % y == 0