0

Где ошибка

var score = parseInt(readLine(), 10) /* 88 and above => excellent 40-87 => good 0-39 => fail */ if (score >=88){ console.log("excellent"); } else if (score >=40 && <88){ console.log("good"); } else { console.log("fail"); }

26th Apr 2022, 4:33 PM
Пётр Дричиц
Пётр Дричиц - avatar
3 Respuestas
+ 4
else if (score >= 40 && score < 88)
26th Apr 2022, 4:41 PM
Lisa
Lisa - avatar
+ 2
Thank you
26th Apr 2022, 4:42 PM
Пётр Дричиц
Пётр Дричиц - avatar
+ 1
if(score >= 88 && score < 101) { console.log("excellent"); } else if(score >= 40 && score < 88) { console.log("good"); } else if(score >= 0 && score < 40) { console.log("fail"); } else { // <score> is out of valid range 0 ~ 100 }
26th Apr 2022, 4:49 PM
Ipang