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

 

median


Given three values, return the one that is the median. This can benefit from the use of both the else operation and the boolean AND operator: &&. e.g. x < 5 && y < 5.


median(0, 1, 2) → 1
median(2, 1, 0) → 1
median(2, 3, 4) → 3

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

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

Copyright Nick Parlante 2017 - privacy