SHARE
TWEET

Untitled

a guest Oct 21st, 2019 91 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. process.stdin.on('data', (age) => {
  6. let born = 2019;
  7. born = born - age;
  8. if ( age <= 99 && > 0){
  9.     console.log('You were born in ' + born);
  10. }
  11. else {
  12.     console.log('Error !');
  13. }
  14. process.exit()
  15. })
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
 
Top