Computer Science, asked by ayushbajpai7856, 9 months ago

A program to print the sum of all digits of a number given by the user.​

Answers

Answered by Anonymous
40

Answer:

Let's see the sum of digits program in C.

  • #include<stdio.h>
  • int main()
  • {
  • int n,sum=0,m;
  • printf("Enter a number:");
  • scanf("%d",&n);
  • while(n>0)
  • {

Similar questions