SHARE
TWEET

Untitled

a guest Oct 21st, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. process.stdin.resume()
  2. process.stdin.setEncoding('utf8')
  3.  
  4. console.log('How old are you ? ')
  5.  
  6.  
  7. process.stdin.on('data', (age) => {
  8.    
  9.    
  10. if ((age > 1) && (age < 99))
  11.     {
  12.        
  13.         console.log('You are born in ' + (2019 - age));
  14.         process.exit()
  15.     }
  16.    
  17.  
  18. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top