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

 

abraskin@mbusd.org > mostDigs
prev  |  next  |  chance

Given three non-negative integers, return the one with the most digits found in the fourth non-negative integer.


If more than one number has the "most" digits return -1 instead.

mostDigs(1010, 10, 101, 0) → 1010
mostDigs(123, 234, 345, 42) → 234
mostDigs(456456, 567567, 678678, 4) → 456456

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

public int mostDigs(int a, int b, int c, int num) { }

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