[PerlChina] 问个问题,关于余数的...

YW ywomol at gmail.com
Tue Dec 20 00:27:31 PST 2005


问个问题:
C:\Documents and Settings\YW>perl
print -3 % 2;
^Z
1
C:\Documents and Settings\YW>perl
print -5 % 7;
^Z
2
C:\Documents and Settings\YW>perl
print 7 % -5;
^Z
-3
C:\Documents and Settings\YW>perl
print 3 % -2;
^Z
-1
----------
倒数第二个, 7% -5, 太古怪了, 内部不知道是怎么算的?
-------------- next part --------------
q?????!???,r??m??m???????j+??j)r?j??j?r????9????Z}??!??M5??


More information about the China-pm mailing list