Sum of all digits until get become a single one
Write an efficient algorithm to sum of all the digit of a result until get single digit.
Given Three method to solve this problem.
1) Iterative solution
2) recursive solution
3) Using modulus operator
C program for iterative sum of all digits until get become single one.
View function execution.
Method 3: Using modulus operator
- Sum of all left leaves nodes of given binary tree
- Sum of all Right leaves nodes of given binary tree
- Binary search tree print odd level node
- Program to print floyd triangle in c
- C program to print half diamond pattern
- program to print left arrow pattern
- Program to print inverted hollow double triangular pattern
- C program to print w star pattern
- C program to print v star pattern
- Program to print double left arrow pattern
- C program to print inverted v pattern
- Program to Print right arrow in front of left arrow
- Print fibonacci of given n number
- Postorder tree traversal using recursion