练习一下for循环

Original 2019-03-11 19:21:05 225
abstract: $min=1;$max=20;$data=range($min,$max);$count=count($data);$res=0;for($i=0; $i<$count; $i++){    $res+=$data[$i];}echo $res,'<hr>'; 以上为for

 $min=1;
$max=20;
$data=range($min,$max);
$count=count($data);
$res=0;
for($i=0; $i<$count; $i++){
    $res+=$data[$i];
}
echo $res,'<hr>'; 

以上为for循环

Correcting teacher:韦小宝Correction time:2019-03-12 09:17:32
Teacher's summary:写的很不错 这些函数方法在以后的实际开发中是必须要用到的

Release Notes

Popular Entries