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

 

tmhscs@gmail.com logic > logic_sumNoDuplicates3
prev  |  next  |  chance

Given three integers, a b c, return their sum. However, if one of their values is the same as another, do not count either of them towards the sum! Return zero if they are all the same value!


logic_sumNoDuplicates3(1, 2, 3) → 6
logic_sumNoDuplicates3(1, 2, 1) → 2
logic_sumNoDuplicates3(2, 1, 2) → 1

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

public int logic_sumNoDuplicates3(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

Post-solution available

Copyright Nick Parlante 2017 - privacy