Hi
I am trying to write an static recursive method that returns the occurrence a particular digit d in an integer n. For example, if passed (1342457,4) it should return 2, whereas when passed (1342457,6) it should return 0. This is not my actual code and it will not sound like that, I just want help with the logic in this. I can't grasp what needs to be done. i should also take care of that no variables are other than the two that the user will input as the integer, and the digit to be checked for.
Bookmarks