Computer Science, asked by Laly5334, 1 year ago

Write a program in c to count the number of digits of a given number using recursion.

Answers

Answered by Anonymous
1
The program output is also shown below.

* C Program to find Sum of Digits of a Number using Recursion.

int sum (int a);

int num, result;

printf("Enter the number: ");

scanf("%d", &num);

result = sum(num);

printf("Sum of digits in %d is %d\n", num, result);

return 0;

Similar questions