Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const input = gets();
- const first = +input[0];
- const second = +input[1];
- const third = +input[2];
- let largest = 0;
- if (first + second + third > largest) {
- largest = first + second + third;
- }
- if (first + second * third > largest) {
- largest = first + second * third;
- }
- if (first * second + third > largest) {
- largest = first * second + third;
- }
- if (first * second * third > largest) {
- largest = first * second * third;
- }
- print(largest);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement