-
Notifications
You must be signed in to change notification settings - Fork 2
/
PHP Lab 8.php
51 lines (45 loc) · 1.2 KB
/
PHP Lab 8.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/*$var = 60;
$num = 45;
switch ($num>$var){
case 0:
echo 'True';
break;
case 1:
echo 'False';
break;
}
*/
$num1 =13;
$num2 =56;
$num3 =78;
echo "<br> The Entered number are : $num1, $num2 and $num3";
switch ($num1>$num2) {
case 1:
echo "When Condition 1 is True";
switch ($num1 > $num3) {
case 1:
echo "When Condition 1 is True";
echo "<br> The Greatest Number is $num1";
break;
case 0:
echo "<br> When Condition 1 is true but condition 2 is False";
echo "<br> the greatest number is $num1";
break;
}
break;
case 0:
echo "<br>When Condition 1 is False";
switch ($num2 > $num3) {
case 1:
echo "When Condition 1 is false but condition 3 is True";
echo "<br> the greatest number is $num2";
break;
case 0:
echo "When both the condition are false";
echo "<br> the greatest number is $num3";
break;
}
break;
}
?>