Given 3 numbers N , L and R. Print 'yes' if N is between L and R else print 'no'.
Given 3 numbers N , L and R. Print 'yes' if N is between L and R else print 'no'.
Sample Testcase :
INPUT
3
2 6
OUTPUT
Sample Testcase :
INPUT
3
2 6
OUTPUT
yes
const readline = require('readline');
const inp = readline.createInterface({
input: process.stdin
});
const userInput = [];
inp.on("line", (data) => {
userInput.push(data);
});
inp.on("close", () =>
{var a = parseInt(userInput[0]);
var b = (userInput[1]);
var c= b.split(" ")
if(+c[0]<a && a+c[1])
console.log("yes")
else
console.log("no")
});
const inp = readline.createInterface({
input: process.stdin
});
const userInput = [];
inp.on("line", (data) => {
userInput.push(data);
});
inp.on("close", () =>
{var a = parseInt(userInput[0]);
var b = (userInput[1]);
var c= b.split(" ")
if(+c[0]<a && a+c[1])
console.log("yes")
else
console.log("no")
});
Comments
Post a Comment