Sum of digits other method

is there any other method to calculate sum of digits?

Hi Esha,
this is the simplest and only way using while loop as all u have to do is extract all digits and take their sum…

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.