Question: Write a code using a loop of your choice to find the sum of the digits of a given number. Get the input from the

Write a code using a loop of your choice to find the sum of the digits of a given number. Get the input
from the user.
Test case1:
Input: 1234
Output: The sum is 10
Explanation: sum =1+2+3+4=10
Test case2:
Input: 1
Output: The sum is 1
Explanation: sum =1
Test case2:
Input: 0
Output: The sum is 0
Explanation: sum =0
Write in C and show code please.
 Write a code using a loop of your choice to find

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!