Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
May 29, 2021 05:52 am GMT

Day 3: Intro to Conditional Statements

 '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('
'); 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") } }

Original Link: https://dev.to/vijaychauhanssn/day-3-intro-to-conditional-statements-26hk

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To