StefiIOE

1.2

Nov 3rd, 2020
917
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'use strict'
  2.  
  3. var readline = require('readline');
  4. var rl = readline.createInterface({
  5.     input: process.stdin,
  6.     output: process.stdout,
  7.     terminal: false
  8. });
  9.  
  10. rl.question('', (p1) => {
  11.  
  12.         p1 = p1.split(", ")
  13.         console.log(footballPoints(Number(p1[0]),Number(p1[1]),Number(p1[2])))
  14.  
  15.         rl.close();
  16.  
  17. });
  18.  
  19. // DO NOT CHANGE ABOVE THIS LINE!!!!
  20.  
  21. function footballPoints(w ,d, l ) { // Write this function
  22.  
  23. var result = w*3 + d*1 + l * 0;
  24. return result;
  25.    
  26. }
  27.  
  28.  
  29.  
RAW Paste Data