Home
Sitemap
Comment policy
TIPSZON - Tips For Career
Home
Computer Science
Placement Guidance
GATE-CSE
Amazon-CSA
Privacy Policy
Disclaimer
Terms and Condition
About
Home
Technology
Sum of Digits Program in C programming
Sum of Digits Program in C programming
by
Shivam verma
May 19, 2021
#include<stdio.h>
int main()
{
int n;
int sum=0;
int m;
printf("Enter number:\n");
scanf("%d",&n);
while(n>0)
{
m = n%10;
sum = sum+m;
n = n/10;
}
printf("Sum is = %d\n",sum);
return 0;
}
Post a Comment
0 Comments
Social Plugin
Categories
Amazon Cloud Support Associate
5
Android
4
Blogging
9
Blogspot
8
C-Programs
11
ChatGPT
2
computer basics
5
Computer science
37
Computer tricks
7
Courses
2
Data structures
1
GATE
3
GATE-Computer Networks
1
How to
8
Jobs
3
Life tips
25
Motivation
12
Personality development
25
Placement Guidance
9
Programming
19
Python Programming
4
Python Programs
1
Python-NumPy
2
Social Media
2
Study Material
3
Study tips
16
Technology
37
Web Development
4
What IS
7
0 Comments
If you have any doubts, Please let me know