php计算 7-17数字之间的总和
<?php //7-17的总和 $n =7; $sum = 0; while($n<=17){ $sum = $sum+$n; $n++; } echo $sum; // 循环3要术,1.初始化; 2.条件;3.++或者减减 ?>
<?php //7-17的总和 $n =7; $sum = 0; while($n<=17){ $sum = $sum+$n; $n++; } echo $sum; // 循环3要术,1.初始化; 2.条件;3.++或者减减 ?>