Day 3: Intro to Conditional Statements
Vijay Chauhan
Posted on May 29, 2021
'use strict';
process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
process.stdin.on('data', function(inputStdin) {
inputString += inputStdin;
});
process.stdin.on('end', function() {
inputString = inputString.split('\n');
main();
});
function readLine() {
return inputString[currentLine++];
}
function main() {
const N = parseInt(readLine().trim(), 10);
if((N % 2 != 0) || ((N > 5 && N <21) && N % 2 == 0)){
console.log("Weird")
} else {
console.log("Not Weird")
}
}
💖 💪 🙅 🚩
Vijay Chauhan
Posted on May 29, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
tailwindcss Implementing Dark Mode and Theme Switching using Tailwind v4 and Next.js
November 29, 2024