Computer Science, asked by nitheesh69015, 6 months ago

Design and develop program to find the grade of the student using switch case statement
if grade is d, then distinction
If grade is A,then first division
If grade is B,then second division
If grade is C,then third division
If grade is F,then fail​

Answers

Answered by valeriy69
1

\small\mathsf\color{pink}{Solution\: using\: JavaScript}

const gradeChecker = grade => {

switch(grade) {

case "D":

return "distinction"

case "A":

return "first division"

case "B":

return "second division"

case "C":

return "third divison"

case "F":

return "fail"

}

}

for (grade of ["A", "B", "C", "D", "F"]) {

console.log(gradeChecker(grade))

}

\small\mathsf\color{lightgreen}useful?\: \color{white}\mapsto\: \color{orange}brainliest

Similar questions