Find the sum of the digits of a number? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 3

Find the sum of the digits of a number?

31st May 2021, 4:11 PM
indumol indumol
indumol indumol - avatar
2 Answers
+ 3
Make a variable sum and intialise it with 0 and take out each number by using a loop and add it with sum
31st May 2021, 4:15 PM
Atul [Inactive]
+ 2
your attempt?
31st May 2021, 4:13 PM
Rellot's screwdriver
Rellot's screwdriver - avatar