a是偶数?

a % 2 == 0

a能被3整除,但不能被2整除。

a % 3 == 0 && a % 2 != 0

如何判定一个年份是否是闰年?

4的倍数、100的倍数、400的倍数,。。。

 

You have no rights to post comments