Assignment 4: Functions Classes And Objects
Practice Questions
Q.1: Write a PHP script to calculate the area and volume of a cylinder using a function.
Q.2: Write a PHP Script to display the sum and average of array elements (Using predefined functions).
Q.3: Write a PHP script to calculate the factorial of a number using a function.
Set A
Q.1: Write a PHP script to calculate xy using a function.
Q.2: Write a PHP script to define a function EvenOdd, which will display even and odd numbers between 1 to 50.
Q.3: Write a PHP script to define a function Maximum, which will accept 3 numbers as parameters and returns a maximum of 3 numbers.
Q.4: Write a PHP script to swap two numbers using a function (Use Call by value and Call by reference)
0 Comments