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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!