-
-
Save deepakkhattar26o2/1691772880055469d4cca6d8e5013f31 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const readline = require("readline").createInterface({ | |
input: process.stdin, | |
output: process.stdout, | |
}); | |
readline.question("Enter digit: ", (num) => { | |
const target = String(Number(num) +1) | |
console.log(parseFloat(22 / 7).toPrecision(`${target}`)); | |
readline.close(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment