C program to add the digits of a number using for loop

C program to add the digits of a number using for loop

Output:

Enter the number to add its digits:
1234
The sum of digits of 1234 is 10

Implementation: