Created
November 8, 2016 16:51
-
-
Save Ludovicmoreau/319b06fad2cd846986ca8a3850fa8fc2 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('Quel est votre âge ? ') | |
process.stdin.on('data', (text) => { | |
if ((text)>=99) | |
console.log('Il y a une erreur, il semblerait que vous soyez trop vieux pour vous servir d\'un ordinateur.') | |
else | |
console.log('Vous êtes né en ' + (2016-(text))) | |
process.exit() | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment