Task 11
1. Average of 3 numbers
a = 26
b = 58
c = 35
Average = 39.666666666667 2. Odd or Even using function
a = 27
Odd Number 3. Sum using function with arguments
a = 29
b = 12
Sum = 41 Task 12
1. Reverse of a string
String = Welcome
Reverse = emocleW 2. Replace a string
String = Welcome Steffy
Replaced String = Welcome Anu 3. Substring Count
String = Hello world.Today is world Environment day
Substring 'world' count = 2 4. First character of each word to uppercase
String = good morning all
Good Morning All 5. First character of the string to uppercase
String = good morning all
Good morning all
Task 13
1. Power of a number
10^2 = 100
2. sin,cos,tan value of a number
sin(3) = 0.14112000805987
cos(5) = 0.28366218546323
tan(1) = 1.5574077246549
3. min & max
min(3,2,1,8,4) = 1
max(3,2,1,8,4) = 8
Task 14
1. Array
10 58 45 59 63
2. Multidimensional Array
Employee ID |
Name |
Place |
Salary |
101 | Anugrah | Ashtamichira | 60000 |
102 | Azariah | Ashtamichira | 65000 |
103 | Nathan | Perumbavoor | 70000 |
3. Associative Array
Husband => Midhun PM
Elder Son => Anugrah PM
Younger Son => Azariah Midhun
Task 15
GLOBALS
a = 63
b = 55
Sum = 118
Task 16
$_GET
Task 17
$_POST
Task 19
$_REQUEST