Pr04_grade.js
412 Bytes
function input() {
var input = document.getElementById("grade").value;
value = input;
}
function output() {
value = parseInt(value);
var grade = "F";
if (value >= 90)
grade = "A";
else if (value >= 80)
grade = "B";
else if (value >= 70)
grade = "C";
else if (value >= 60)
grade = "D";
else
grade = "F";
document.writeln(grade);
}