You are provided with two numbers. Find and print the smaller number.
Input Description:
You are provided with two numbers as input.
Output Description:
Print the small number out of the two numbers.
Sample Input :
23 1
Sample Output :
1
const readline = require('readline');
const inp = readline.createInterface({
input: process.stdin
});
const userInput = [];
inp.on("line", (data) => {
userInput.push(data);
});
inp.on("close", () => {
var data = userInput[0].split(" ");
var a = parseInt(data[0]);
var b = parseInt(data[1]);
console.log(Math.min(a,b));
});
Comments
Post a Comment