Answer Posted / guest
#include<stdio.h>
int main()
{
int n,sum=0;
printf("enter number");
scanf("%d".&n);
for(int i=0;i<5;i++)
{
sum=sum+(n%10);
n=n/10;
}
printf("sum is %d",sum);
return 0;
}
Is This Answer Correct ? | 16 Yes | 2 No |
Post New Answer View All Answers
How variables are declared in c?
What are the different categories of functions in c?
What does static variable mean in c?
can anyone suggest some site name..where i can get some good data structure puzzles???
write a progrmm in c language take user interface generate table using for loop?
How to implement a packet in C
Should a function contain a return statement if it does not return a value?
How can you check to see whether a symbol is defined?
How many bytes is a struct in c?
What is a lvalue
Explain null pointer.
Write a code of a general series where the next element is the sum of last k terms.
Which node is more powerful and can handle local information processing or graphics processing?
What is void pointers in c?
What is nested structure with example?