Day 25: Student Result of 100DaysCodingChallenge

Hello all, 

I have started the 100 days of coding challenge to improve my programming skills..

Today is the Day25 of 100DaysCodingChallenge for 

Student Result input Marks taken by the user.

Code : 

let marksObtained = prompt("Enter your obtained marks : ");
if (marksObtained >= 40) {
  if (marksObtained >= 90) {
    console.log("You obtained grade A.");
  } else if (marksObtained >= 80) {
    console.log("You obtained grade B.");
  } else if (marksObtained >= 70) {
    console.log("You obtained grade C.");
  } else if (marksObtained >= 60) {
    console.log("You obtained grade D.");
  } else {
    console.log("You obtained grade E.");
  }
} else {
  console.log("You are Failed this Examination.");
}

Output :     



Happy Coding:)


Comments

Popular posts from this blog

Day 55: Pattern using loops of 100DaysCodingChallenge

Day 7: Square or Power Integer Numbers of 100DaysCodingChallenge

Day 45: Pattern using loops of 100DaysCodingChallenge