I need to make use of recursion, in finding how many times the digit six appears in random numbers that are two digits, so from 10 up to 99 and then i need to print how many times six digit appears.
One essential element of a recursive method is that the function or method has to be called from within itself.
example:a recursive function that prints a binary numeral for a positive integer
//so if the function will print only, void is fine. I'm writing this to "return" the count of digit 6 in int n.
int sixCount(int n) {
... //here we write the function
//remember, if( n % 10 == 6 ) then it ends with a 6
// also, n / 10 = the rest of the number
return sixCount( ... ); //somewhere we need a recursive call
}