20. Function that returning values
function add($x, $y) {
$total = $x + $y;
return $total;
}
$num=0;
echo “My number is “ . $num . ”<br />”;
$num = add(5,6);
echo “Now, my number is “ . $num;
21. Excercise
1. Write a php program to determine which one is the biggest number
from 2 numbers
2. Write a php program to determine which one is the biggest number
from 3 numbers
3. Write a php program which can determine a number is odd or even
4. Write number from 1 to 20 with while, do while, and for
5. Write even number from 1 to 20 with while, do while, and for
6. Write odd number from 1 to 20 with while, do while, and for
22. Homework
● Write a php program to determine the letter grade from given number
input (hint: use a function to generate the letter grade)
● Add a function to exercise number 1, 2, and 3