perl的

打印Yes如果是大于2的质数

echo 11 | perl -ne 'print $_ == ($i + 2) ? "yes" : "" while ($_ % (2 + $i ++));'

所有跟帖: 

cool! -botong- 给 botong 发送悄悄话 botong 的博客首页 (0 bytes) () 07/24/2009 postreply 12:57:27

请您先登陆,再发跟帖!