Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. process.stdin.resume()
  2. process.stdin.setEncoding('utf8')
  3.  
  4. console.log('How old are you ? ')
  5. process.stdin.on('data', (text) => {
  6. if ( text < 99 && text < 2019 && text > 0){
  7. text -= 2019
  8. text *= -1
  9. console.log(text)
  10. }
  11.  
  12. process.exit()
  13. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement