php workspace

Solutions on MaxInterview for php workspace by the best coders in the world

showing results for - "php workspace"
Isaac
17 Mar 2019
1<?php
2  $x[0]=22 ; $x[1]=32;$x[2]=35;$x[3]=40;
3for($i=0;$i<=count($x)-1;$i++)
4echo $x[$i];
5echo "<br>" .count($x);
6echo "<br> thesumof array valueis = $r <br> " ;
7function findsum($a)
8{
9 $sum=0
10for($i=0 ;$i<count($a);$i++)
11$sum+=$a[$i];
12return $sum;
13}
14$r=findsum($x);
15$l=largest($x);
16echo"<br>" the largest value is = $l<br> " ; 
17function largest($q)
18{
19$l=$q[0];
20for($i=1;$i<count($q);$i++)
21if($q[$i]>$l)$l=$q[$i];
22return $l ; 
23} 
24?>
queries leading to this page
workspace phpphp workspacephp workspace