Given a number Num, find the sum of digits of the number.
Input : 444 Output : sum of digits of 444 is : 12 Input : 34 Output : sum of digits of 34 is : 7
1. Divide the number into single digits 2. Find the sum of digits .
sum of digits of 123 is : 6
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.