fork download
  1. <?php
  2. // your code goes here
  3. $arreglo = array(1,30,3,5,7);
  4. $may = $arreglo[0];
  5. for($i = 0; $i < count($arreglo);$i++){
  6. if($arreglo[$i] > $may){
  7. $may = $arreglo[$i];
  8. }
  9. }
  10. echo $may;
Success #stdin #stdout 0.03s 52480KB
stdin
Standard input is empty
stdout
30