logo CodeStepByStep logo


Language/Type: PHP parameters return

Write a function named average_of_3 that accepts three number as parameters and returns their average.

For example, the call of average_of_3(4, 7, 13) should return 8, and the call average_of_3(0.5, -1, 4.25) should return 1.25.

Function: Write a PHP function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.