Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let input = [
- '1', // the input is always a string, so it's '3' and not 3
- '2',
- '3',
- ];
- let print = this.print || console.log;
- let gets = this.gets || ((arr, index) => () => arr[index++])(input, 0);
- let num1 = +gets();
- let num2 = +gets();
- let num3 = +gets();
- let greatNum = Math.max(num1, num2, num3);
- let smallestNum = Math.min(num1, num2, num3);
- let sum = greatNum + smallestNum;
- print(sum);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement