Math, asked by PrajwalramG5481, 1 year ago

Write recursive functions to calculate sum of digit of a number use this in main()to accept a number and pint the sum of digits

Answers

Answered by Anonymous
1

Step-by-step explanation:

The function sum() is used to find sum of digits of a number using recursion. In function sum() check the value of 'num' variable is not equal to 0. If the condition is true execute the statement. Divide the value of 'num' variable by 10 integer value.

Answered by Anonymous
0

Answer:

follow me...............

Attachments:
Similar questions