about | help | code help+videos | done | prefs |
Write a RECURSIVE method that accepts a positive integer called origNum and an integer called countDigit which will be a single digit from 0 to 9. Return the number of times that digit appears in origNum. Please note that the digit might not appear at all. Absolutely no string commands or variables are allowed!!! READ THE PREVIOUS SENTENCE AGAIN. You MUST write a recursive solution to earn any credit. READ THE PREVIOUS SENTENCE AGAIN. mar27_2017_APSLHL_countDigit(142112, 1) → 3 mar27_2017_APSLHL_countDigit(123456, 5) → 1 mar27_2017_APSLHL_countDigit(5554422, 5) → 3 ...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: 280
Copyright Nick Parlante 2017 - privacy