Computer Science, asked by lokendrabaghel5385, 10 months ago

What will be the output if variable marks is 75? if (marks >= 80) { alert(""Excellent!""); } else if (marks >= 60 && marks < 80) { alert(""Good!""); } else if (marks > 50 && marks < 60) { alert(""Average!""); } else { alert(""Improve yourself !""); }

Answers

Answered by pwdsmeena
0

Answer:

output will be Alert(""Good!"")

Explanation:

Answered by shilpa85475
0

Output will be an alert box which has Good written on it.

EXPLANATION:  

  • The given code is using a if-else statement. If the given condition is satisfied,  then it follows the instructions written inside that if loop else it will jump to another condition.
  • The given variable marks is 75, so the first condition marks >=80 is untrue, hence it will jump to else portion where the next condition says, if marks >=60 and <80, alert “Good”.
  • Hence, output will be ‘Good’ as 75 is greater than 60 and less than 80.

Similar questions