What would you like to do?

Program in c language to find the sum of digits?

already exists.

Would you like to merge this question into it?

already exists as an alternate of this question.

Would you like to make it the primary and merge this question into it?

exists and is an alternate of .

#include <stdio.h>
void main()
{
int digi,num,i,sum=0;


printf("Enter the number of digits:");
scanf("%d",&num);

while(i>0);
{
for(i=0;i<10000;i++)
{
digi=num;
i=digi%10;
sum=sum+i;
num=digi/10;
}
printf("The sum of digits entered is %d",sum);
}
}
7 people found this useful
Thanks for the feedback!
Follow

Is Verlox your scariest role yet? How would you describe the character?

View Full Interview

What would you like to do?

C program to find sum of digits of a number using function?

#include #include void main() { int sumdig(int); int n,sum,d,f,rev=0; clrscr(); printf("enter the number"); scanf("%d",&n); sum=sumdig(n); printf("%d",sum) (MORE)

Which Computer Programming Language Should You Learn?

If you pay attention to trends in education, you may have noticed that more and more students are learning some computer programming code earlier in their education. In fact, (MORE)
commented on this article

Tips for Learning a Foreign Language in College

Learning a foreign language in college has become very common. Often, it is mandatory for completing a major or for satisfying general education requirements. Even so, knowled (MORE)

Digitize Your Paper Genealogy Documents

A good way to reduce the amount of paperwork involved in genealogical research is to begin a program of digitizing or scanning documents then attaching the digitized copies to (MORE)

Five Tips on Learning a Second Language

Second language learning or acquisition is learning a new language once the first language is already fully established. Are you interested in teaching a second language to y (MORE)

What would you like to do?

Write a java script program to find sum of the digits of a given integer?

import java.util.*;   class SumOfDigits {  public static void main(String args[]) {  int sum = 0;  System.out.println("Enter (MORE)

What would you like to do?

C program to find the sum of the digits of a number?

Here You go........... # include # include void main() { int no,sum=0,rem=0; clrscr(); printf("\\nEnter a Number: "); scanf("%d",&no); while(no>0) { rem=no%10; sum=sum+rem; n (MORE)

What would you like to do?

Write a java program to find out the sum of a number of n digits?

class Sum_Of_Digits { public static void printSumandnoofdigits(int n) { int temp = n; int count = 0; int sum = 0; while ( n > 0 ) { sum = sum + n % 10; n = (MORE)

What would you like to do?

Java program to find the sum of digit of a number and reverse it?

public SumRevInt(String args) { System.out.println("in constr"); if(args == null) { System.out.println("hello, enter a choice during execution"); } else { char (MORE)

What would you like to do?

Write a program to find the sum of the digits and reverse of the digits using inheritance?

There is a far easier way to implement the required functionality than using inheritance. However, to answer the question, here's one possible solution that makes use of inher (MORE)