Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const input = gets()
- function submitResult(input) {
- let text = '';
- switch(input) {
- case '0':
- text = 'zero';
- break;
- case '1':
- text = 'one';
- break;
- case '2':
- text = 'two';
- break;
- case '3':
- text = 'three';
- break;
- case '4':
- text = 'four';
- break;
- case '5':
- text = 'five';
- break;
- case '6':
- text = 'six';
- break;
- case '7':
- text = 'seven';
- break;
- case '8':
- text = 'eight';
- break;
- case '9':
- text = 'nine';
- break;
- default:
- text = 'not a digit';
- }
- print(text)
- }
- submitResult(input)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement