codinasion-archive / codinasion-monorepo

Community Monorepo
https://codinasion.org
MIT License
52 stars 167 forks source link

Find average of digits of a number by recursion #4010

Open harshraj8843 opened 1 year ago

harshraj8843 commented 1 year ago

Description

Write a program to find average of digits of a number by recursion

Average of digits of a number is the sum of digits of the number divided by the number of digits in the number. For example, the average of digits of 123 is 6. The sum of digits of 123 is 6 and the number of digits in 123 is 3. So, the average of digits of 123 is 6/3 = 2.

Input  : 123
Output : 2

Tracking Issues

Shaileshalluri commented 11 months ago

!assign