Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const input = ['3', '1', '9'];
- const print = this.print || console.log;
- const gets = this.gets || ((arr, index) => () => arr[index++])(input, 0);
- const a = Number(gets());
- const b = Number(gets());
- const c = Number(gets());
- if (a > 0 && b > 0 && c > 0) {
- console.log('+');
- } else if (a < 0 && b < 0 && c < 0) {
- console.log('-');
- } else if ((a < 0 && b < 0 && c > 0) || (a < 0 && b > 0 && c < 0) || (a > 0 && b < 0 && c < 0)) {
- console.log('+');
- } else if ((a < 0 && b > 0 && c > 0) || (a > 0 && b < 0 && c > 0) || (a > 0 && b > 0 && c < 0)) {
- console.log('-');
- } else if (a === 0 || b === 0 || c === 0) {
- console.log('0');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement