Simple Exam Grading System

This is very simple grading system based on single subject marks.

var mark=60
if(mark>60)
{

document.write("pass");

}
else{

document.write("Fail")

}
*/
var mark=prompt("Enter Mark");

 if(mark>100)
{
document.write("Invalid");
}

else if(mark>90)
{

document.write("A");

}

else  if(mark>80)
{

document.write("B");

}
else  if(mark>70)
{

document.write("C");

}

 else  if(mark>60)
 {

document.write("D");

}
else
	document.write("F");

Leave a Reply