We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Day 3: Intro to Conditional Statements
Day 3: Intro to Conditional Statements
Sort by
recency
|
1782 Discussions
|
Please Login in order to post a comment
function main() { const N = parseInt(readLine().trim(), 10); let result = "Weird";
}
My solution is as follows:
Intro To Condition if(N % 2 === 0){ if(N>2 && N<5){ console.log("Not Weird"); }else if(N>6 && N<=20){ console.log("Weird"); }else if (N > 20){ console.log("Not Weird"); } }else if (N % 2 !== 0){ console.log("Weird"); }
there is some problem with 24, I think, it is passing for me on my pycharm.