WAP to input a number and find sum of its
factors
Answers
Answered by
2
Sum of all the factors of a number. Examples : Input : n = 30 Output : 72 Dividers sum 1 + 2 + 3 + 5 + 6 + 10 + 15 + 30 = 72 Input : n = 15 Output : 24 Dividers sum 1 + 3 + 5 + 15 = 24. Recommended: Please solve it on PRACTICE first, before moving on to the solution. A simple solution is to traverse through all ...
Similar questions