c program to find the sum of given number

# include<stdio.h>
int main
{
int number;
int sum=0;
int remainder;
printf("enter a number\n");
scanf("%d",&number);
for(;number!=0;)
{
remainder=number%10;
sum=sum+remainder;
number=number/10;
}
printf("sum of digits=%d",sum);
}


4.14
7
Phoenix Logan 186120 points

                                    Enter the number
300
Given number = 300
Sum of the digits 300 = 3
&nbsp;
&nbsp;
Enter the number
16789
Given number = 16789
Sum of the digits 16789 = 31

4.14 (7 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
Count number of digits in a number in C c program to sum of two numbers c programming using digit summation program to find sum of even numbers in digit in c C program to calculate sum of digits of a number. C program to count number of digits in a number c program to find sum of two numbers how do i sum in c programming c program to compute the sum of digits in a given integer sum c program sum of even digits in a number in c Write a C program to calculate sum of digits of any number. Write a C program to count number of digits in any number. sum of digits c program program that compute the value of the sum of the digits in an integer in c find out integer of sum of digit in c count the number of digits in a number in c program C. Given Length and Sum of Digits... sum of digits using function in c how to retrieve sum of digits \of number in c print sum of digits in c count the digits of a number in c how many number need for the sum of any number numbers in c sum of two given integer c program c program to find the sum of all the digits find the sum of the series in c Write a program in C to find the sum of all elements of the array. digit sum in c c code sum how to count number of digits in c sum of numbers using c Write a c program to find the sum of individual digits of a given number. find sum in c c program code for finding sum by array sum in c programming how to count number of digits in a number in c find the sum of individual digit of a number in c sum of individual digits in c using function count no of digits in c Write a C program to calculate the sum of the array elements find the sum of numbers c code find the sum in c while using functions sum of 5 digits in c how to sum all digits in a number in c c program for sum of digits write a c program to find sum of individual digits using for Write a program in C to display sum of all digits of any given number. c program to calculate sum using function Write a program in C to calculate SUM of all digits present in a user given number. add sum of digits in c c program to calculate sum of digits of a number sum of integer in c sum of the digit in c find the sum of digits in c program c program to find sum of array elements using functions c program to calculate the sum of series count the number of digits in c count number of digits using loop in c sum all numbers in a number in c 3) Write a C program to find the sum of even numbers upto the given number N. write a c program to create a function named sum which calculate the sum of three given number write a c programe to creat a function named sum which calculate the sum of three given number sum of value in c find digit sum of a number in c code to calculate sum of digits in c using functions C Program to Count Number of Digits in an Integer find sum of all the digits in c sum of digits of a five digit number c program c program to sum of two numbers using function sum of digit in c determine whether the sum is made using the numbers c programming sum the numbers in C how to take in an input of integers and sum all of the digits in c c program for sum of n numbers sum of all the digits of a nuymber program in c sum of numbers in a digit c Write a program to find the sum of all the digits of a number by taking n input in c Write a program to find the sum of all the digits of a number in c Write a program to find the sum of all the digits of a number. in c program to sum of digits of a number in c finding sum of digits in c int sum program in c c program to find sum of n numbers using loop c program to find sum of n numbers using for loop printing sum of digits in c write a program to calculate sum of digits of a number in c to find the sum of digits of a number in c how to find the sum of the digits in c SUM OF DIGITS problem solution in c c program to find sum of digits of a number how to count the digits in an int c how to sum numbers c 15) Write a C code that finds the sum of the digits of a number. c program to count number of digits in given number c program to calculate the sum of natural numbers c program to find sum of n natural numbers to Add even digits from the given number C program Write a program to display the sum of n numbers where n is given by the user in c Write a program to take a number and calculate the sum of digit of a number. in c C. Given Length and Sum of Digits C. Given Length and Sum of Digits.. c program to find sum of digits of a 5 digit number sum of digits in c algorithm to count number of digits in a number in c sum of two numbers in c how to get the digits of an integer and sum the odd in c how to sum in c let total number = 5 total number = number in c sum of numbers in c how to print directly sum of digits in c how to get the sum of digits of a number in C sum of individual digits in c sum to a number in c count the numer of digits in a int c sum digits of a number c c program to find sum of individual digits of a given number write a c program to find sum of individual digits how to find the sum of the numbers in an array in c how to sum digits of a number in c sum of digits of 5 digit number in c c program find sum of digits sum of its digits in c Sum of digits of a number in c using for loop Program for Sum of the digits of a given number c sum of digits of the number in c sum in c program sum of two numbers in c program write a program in c to find the sum of n numbers of a series given an array of integers find the sum of its elements. in c program to find sum of digits of a number in c calculate sum in c language write a c program to calculate sum of array program to count number of digits in c sum of digits until single digit in c sum numbers in c count the number of digits in a number in c C program to count total number of digits of an Integer c program to find sum of even ni in a given number c program to find sum of even digits in a given number sum of second digits of number in c wriite a c program yo count total number of digits of an intiger number sum numbers c sum of numbers in a number print out the sum of two digits in c C programme to find the sum of digits of given number program to find sum of digits in c 6. Write a c program to print sum of digits. c sum of all digits in a string c program for sum how to find sum of digits of a number in c Write a program to find the sum of digits of given number. count the digit that reapeats more frequently in an integer in C sum of digits c Write a program to find out sum of digits of given number. Sum all the digits of a number 2.Write a C program to enter a 4 digit number and calculate sum of digits sum of prime number in c C program to calculate the number of permutations of given digits print the sum of digits of a given number in c sum of digits of number in c 1. To write a c program to print sum of digits of a given number. write a program from one number from user and print sum of digit write a program that takes an integer number and prints out the sum of the digits sum of different digits in c c program to add 4 digit number arry find number of digits and their sum in c Develop a C routine to find sum of digits of given number? sum of numbers return 1 to n c# WAP to input a five digits number and find the sum of digits number with digits sum as c c program to find sum of digits of a 4 digit number Sum of digits for the given number in c program write a c program to calculate the sum of natural numbers along with the sequence how to find the sum of the digits of a number sum of number in c c program sum of two numbers c program to sum of digits sum of digits in c Write a c program to calculate sum of inditiual digits of a positive number digits sum in c write a c program to add digits of a number c program to find sum of digits of a 3 digit number sum of digits in c program sum of number in c program how to add digit of a number digit sum c sum of all digits of a number in c sum of all digits of an integer C c program sum of digits write a program to print the sum of all digits of a given number c sum of digits get digit sum program in c adding digits of a number in c sum of digits in c user defined sum of integers in c If a three-digit integer is input through the keyboard, write a program to calculate the sum of its digits. code to find sum of digits total of all digits and print them in c c program to find the sum of input number c program to find the sum of given number sum of digits of a number in c find sum of digits of a number in c how to print sum of no of digits in c wap to print sum of digits
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source