Okay, the problem is the following..I need to enter a number and the program need to print how much digits of the number are < 5. The printing of the digits should be done with a recursive function. Example: "For the number 8423871 is should print 4231 : 4". Here is my solution without recursion, can someone help me with the recursive solution please..
int main()
{
int n, pom, digit=0, a;
printf("Enter a number: ");
scanf("%d", &n);
pom=n;
while(pom > 0)
{
a = pom % 10;
if(a < 5)
digit++;
pom=pom/10;
}
printf("%d : %d\n", n, digit);
return 0;
}
print_if_lower(int input)
, which should print a digit, then call itself minus the digit just printed.