C++ to find sum of digits of a number



Output :

Enter any number : 584
Sum of digits : 17