about | help | code help+videos | done | prefs |
Write a method that finds the greatest sum of any two integers selected from the input parameter array of integers. The method returns this sum, unless the sum is even. In that case it returns 1/2 of the sum. The input array will contain at least two integers. This one is a little harder than it looks! Be careful! greatSum([77, 80, 21, 18, -400, -500]) → 157 greatSum([2, 5]) → 7 greatSum([-100, 100]) → 0 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 290
Copyright Nick Parlante 2017 - privacy