Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- process.stdin.resume()
- process.stdin.setEncoding('utf8')
- console.log('Quel est ton age ?')
- process.stdin.on('data', (int) => {
- if (int < 99) {
- console.log(2019 - int - 1)
- process.exit()
- }
- if (int > 99 || typeof int == 'string') {
- console.log('Entrez un nombre valide !')
- process.exit()
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement