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

 

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

Write a method that returns the number of times the digits "37" appear imbedded in the integer parameter. Note that the integer parameter could be negative! You are not allowed to use arrays or strings to solve this problem. However you ARE allowed to use Math.abs. Note that the input parameter will be a valid integer.


count37s(-43711) → 1
count37s(37837) → 2
count37s(853750) → 1

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

public int count37s(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: 290

Copyright Nick Parlante 2017 - privacy