Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
406 B
2
Indexable
<?php

$numbers=explode(' ',readline('enter numbers whit just a space :' ));

$max=$numbers[0];
$min=$numbers[0];


for($i=0 ; $i<count($numbers); $i++){

    if($numbers[$i] > $max){

     $max =$numbers[$i];
    }
}
echo 'your max is ' .$max;

for($i=0 ; $i<sizeof($numbers);  $i++){

    if ($numbers[$i] < $min){
        $min = $numbers[$i];
    }
}
 
echo 'your min is ' .$min;