-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathswitch.php
More file actions
48 lines (41 loc) · 905 Bytes
/
switch.php
File metadata and controls
48 lines (41 loc) · 905 Bytes
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
<?php
/**
* Topic: Switch
* Author: Muhammad Afzal
* Class: e-Rozgaar Batch#11
* Date: 7th Jan 2021
*/
//Define Constant
define("BR","<br />");
$Grade="d";
//Switch Statement to Get the Marks Range
switch(strtoupper($Grade)){
case "A+":
echo "85-100".BR;
break;
case "A":
echo "80-84".BR;
break;
case "B+":
echo "75-79".BR;
break;
case "B":
echo "70-74".BR;
break;
case "C+":
echo "65-69".BR;
break;
case "C":
echo "60-64".BR;
break;
case "D":
echo "55-59".BR;
break;
case "E":
echo "50-54".BR;
break;
default:
echo "0-49".BR;
break;
}
?>