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

 

frew@mclean.com unit5day1 > zeroDigits
prev  |  next  |  chance

Write a method named zeroDigits that accepts an integer parameter and returns the number of digits in the number that have the value 0. For example, the call zeroDigits(5024036) should return 2 and zeroDigits(743) should return 0. The call zeroDigits(0) should return 1.


zeroDigits(5024036) → 2
zeroDigits(743) → 0
zeroDigits(0) → 1

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

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