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

 

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

Given three positive numbers, return the value that occurs most frequently. If all the numbers occur the same number of times, return -1.


mode(4, 3, 3) → 3
mode(7, 7, 7) → 7
mode(1, 2, 3) → -1

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

int mode(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: 100

Copyright Nick Parlante 2017 - privacy