Print the First 3 multiples of the given number "N". (N is a positive integer)
Note: print the characters with a single space between them.
Input Description:
A positive integer is provided to you as an input.
Output Description:
Print the First 3 multiples of the number with single spaces between them as an output.
Sample Input :
2
Sample Output :
2 4 6
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]);
console.log(a,a*2,a*3);
});
Comments
Post a Comment