I am a newbie learning PHP and i am trying to find average of 3 numbers but not getting the correct answer. I don't know where i am going wrong.
function percentage($math,$eng,$sc){ $s = $math+$eng+$sc / 3 ; return $s; } $p = percentage(10,20,30); echo $p; I am getting the ansewer as 40 whereas i am supposed to get 20. Kindly check if there is any error.
$s = ($math + $eng + $sc) / 3;.percentage()and notaverage()?