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

 

jebbert@volusia.k12.fl.us > vpeepsCountDigits
prev  |  next  |  chance

Write a recursive method that returns the number of digits in a positive integer parameter. Your method MUST use recursion in a non-trivial way! This one can be done in one line, but, of course, you can use more lines of code if you would like to.


vpeepsCountDigits(43223) → 5
vpeepsCountDigits(28) → 2
vpeepsCountDigits(7) → 1

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

public int vpeepsCountDigits(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: 390

Copyright Nick Parlante 2017 - privacy