Challenge: Sum of two Numbers
Write a function to calculate the sum of two numbers.
We'll cover the following
Problem Statement
Write a PHP function sum
that takes two integer parameters and returns their sum.
Input
two numbers
Output
sum of the two numbers
Sample Input
4, 5
Sample Output
9
Coding Exercise
Write your code in the code widget below. If you don’t get it right, don’t fret; the solution is also given.
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy