Last active
March 18, 2019 08:50
-
-
Save GuillaumeLoup/4050faac2b1d7abcb968801af84398a2 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
process.stdin.resume() | |
process.stdin.setEncoding('utf8') | |
console.log('What\'s your age ? ') | |
process.stdin.on('data', (number) => { | |
if (number < 99 && number >= 1){ | |
console.log("votre année de naissance est " + (2019 - number)) | |
process.exit() | |
} else { | |
console.log("vous mentez!") | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment