-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJS26.js
More file actions
34 lines (28 loc) · 941 Bytes
/
JS26.js
File metadata and controls
34 lines (28 loc) · 941 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
function CalculateGrade() {
marks = document.getElementById("txtMarks").value;
if (marks>=0 && marks<40)
{
alert("Your mark is " + marks + " and you are failed");
}
else if (marks>=40 && marks<50)
{
alert("Your mark is " + marks + " and your grade is D");
}
else if (marks>=50 && marks<60)
{
alert("Your mark is " + marks + " and your grade is C");
}
else if (marks>=60 && marks<70) {
alert("Your mark is " + marks + " and your grade is B");
}
else if (marks>=70 && marks<80) {
alert("Your mark is " + marks + " and your grade is A");
}
else if (marks>=80 && marks<100) {
alert("Your mark is " + marks + " and your grade is A+");
}
else
{
alert("Sorry!!!!! You have enter greater than 100 marks")
}
}