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

 

crehwinkel@frhsd.com apcsa-unit4-loops > countDigits
prev  |  next  |  chance

Write a method called countDigits which returns the count of the digits in the number which is passed to the method. For example countDigits(8305) would return 4.


countDigits(8305) → 4
countDigits(12345) → 5
countDigits(913200) → 6

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

public int countDigits(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