Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const input = gets()
  2.  
  3. function submitResult(input) {
  4.    
  5.     let text = '';
  6.  
  7.       switch(input) {
  8.     case '0':
  9.       text = 'zero';
  10.       break;
  11.     case '1':
  12.       text = 'one';
  13.       break;
  14.     case '2':
  15.       text = 'two';
  16.       break;
  17.     case '3':
  18.       text = 'three';
  19.       break;
  20.     case '4':
  21.       text = 'four';
  22.       break;
  23.     case '5':
  24.       text = 'five';
  25.       break;
  26.     case '6':
  27.       text = 'six';
  28.       break;
  29.     case '7':
  30.       text = 'seven';
  31.       break;
  32.     case '8':
  33.       text = 'eight';
  34.       break;
  35.     case '9':
  36.       text = 'nine';
  37.       break;
  38.     default:
  39.       text = 'not a digit';
  40.   }
  41.     print(text)
  42.    
  43. }
  44.  
  45. submitResult(input)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement