C program to calculate sum of digits

Program statement

Write a program to calculate the sum of digits from number. Here we take a number as input from user and by using operator and loop we will calculate the sum of digit.
For Example
Let a number is 345,
then sum of digit is 17.

Program for sum of digits


Help others by sharing the content!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.