id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > ggg1GreatestSum
prev  |  next  |  chance

Write a method that accepts three integer input parameters, then returns the greatest sum that can be made from any pair of those numbers. For example, for the set of numbers 8, 2, 5 you would return 13 since 8+5=13 and any other pair produces a smaller sum. Note that these numbers can be ANY integers including positive, negative, or zero.


ggg1GreatestSum(4, 5, 2) → 9
ggg1GreatestSum(18, 18, 18) → 36
ggg1GreatestSum(4, 5, 6) → 11

...Save, Compile, Run (ctrl-enter)

public int ggg1GreatestSum(int a, int b, int c) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 220

Copyright Nick Parlante 2017 - privacy