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

 

warePair


A "warepair" is any three numbers such that any two of the numbers add up to the other number. For example, 3, 0, -3 form a "warepair" since 3+(-3)=0. 8, 2, 6 also forms a "warepair" since 2+6=8. Write a method that accepts three integers in any order. The method returns TRUE if the three integers form a "warepair" but returns FALSE otherwise.


warePair(4, 5, 9) → true
warePair(-2, -4, -2) → true
warePair(6, 7, 3) → false

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

public boolean warePair(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