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

 

norm.krumpe@muohio.edu > secondLargest
prev  |  next  |  chance

Given 4 numbers, return the value of the second largest number. Note that if two or more numbers are tied for largest, then the second largest value is also the largest value.


secondLargest(1, 2, 3, 4) → 3
secondLargest(3, 2, 1, 4) → 3
secondLargest(5, 7, 5, 9) → 7

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

int secondLargest(int a, int b, int c, int d) { }

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

Copyright Nick Parlante 2017 - privacy