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

 

srp4379@lausd.net quiz3 > middleOf3
prev  |  next  |  chance

int middleOf3(int n1, int n2, int n3). Given 3 numbers, return the median, which is the middle value. If there is no middle value, as in the case where two numbers are the same, return the value of the number that appears twice.


middleOf3(1, 2, 3) → 2
middleOf3(5, 5, 6) → 5
middleOf3(5, 6, 6) → 6

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

int middleOf3(int n1, int n2, int n3) { }

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: 135

Copyright Nick Parlante 2017 - privacy