about | help | code help+videos | done | prefs |
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) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 290
Copyright Nick Parlante 2017 - privacy