<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_19203"> <div class="blockcode"> <div id="code_rqc"><ol> <li>#!/usr/local/php53/bin/php</li> <li> <li><?php<li>/**<li>* @params array=rs_array<li>*/<li><li>#define(MAX,1000);<li><li>$MAX = 1000;<li>$from = 2;<li>$rs_array= array();<li><li><li>echo $MAX."以内的素数...n";<li><li>while($from<$MAX){<li> $is_susu=true;<li><li> foreach($rs_array as $vals){<li> if ((sqrt($from) 1) % $vals == 0 ){<li> $is_susu=false;break;<li> }<li> } <li><li> if($is_susu) {<li> echo $from." ";<li> $rs_array[]=$from;<li> }<li> <li> $from ;<li>}<li>?></li> <li> </ol></div> <em onclick="copycode($('code_rqc'));">复制代码</em> </div> </td></tr></table> <div id="comment_19203" class="cm"> </div> <div id="post_rate_div_19203"></div> <br><br>