Question: write a recursive c++ function int count_digit(int digit, int num) that returns the number of occurences of digit in the decimal representation of num. digit
write a recursive c++ function int count_digit(int digit, int num) that returns the number of occurences of digit in the decimal representation of num. digit is an int between zero and nine inclusive. for example, the call count_digit(8,18488) should return 3, because there are three eights in the decimal representation of 18488.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
