Advertisement
CR7CR7

odd-even

Sep 18th, 2022
608
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.28 KB | None | 0 0
  1. let input = [
  2.   '100',
  3. ];
  4.  
  5. let print = this.print || console.log;
  6. let gets = this.gets || ((arr, index) => () => arr[index++])(input, 0);
  7.  
  8. let number = +gets();
  9.  
  10. if (number % 2 === 0) {
  11.   console.log('This number is even.');
  12. } else {
  13.   console.log('This number is odd.');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement