lwcompany

功到自然成

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: :: 管理 ::

2011年8月27日

摘要: <?php//最大公约数function gcb($a,$b){ if($a<$b) { $temp=$a; $a=$b; $b=$temp; }if ($a%$b==0) return $b;while($b!=0) { $temp=$a%$b; $a=$b; $b=$temp; } return $a;}$d=gcb(24,36);echo $d;?> 阅读全文
posted @ 2011-08-27 12:00 平渡飞扬 阅读(241) 评论(0) 推荐(1) 编辑