Q. |
Which of the following methods can be used to find the sum of digits of a number? |
A. | recursion |
B. | iteration |
C. | greedy algorithm |
D. | both recursion and iteration |
Answer» D. both recursion and iteration | |
Explanation: both recursion and iteration can be used to find the sum of digits of a number. |
Login to Continue
It will take less than 2 minutes