You are viewing a single comment's thread. Return to all comments →
function main() { const N = parseInt(readLine().trim(), 10); let n = N if (n % 2 !== 0){ console.log("Weird") }else if (n % 2 === 0 && n >= 2 && n <= 5) { console.log("Not Weird") }else if (n % 2 === 0 && n >= 6 && n <= 20){ console.log("Weird") }else if (n > 20){ console.log("Not Weird") } }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 3: Intro to Conditional Statements
You are viewing a single comment's thread. Return to all comments →