Answer Posted / anil kumar nahak
void main()
{
int n,i,sum=0,r;
printf("enter the value");
scanf("%d",&n);
while(n>0)
{
rem=num%10;
sum=sum+rem;
num=num/10;
}
printf("sum = %d",sum);
}
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
Is main an identifier in c?
Write a program to check palindrome number in c programming?
Why c is procedure oriented?
Explain the advantages of using macro in c language?
what is the syallabus of computer science students in group- 1?
What is 1f in c?
Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?
write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)
Is it possible to execute code even after the program exits the main() function?
What is the meaning of && in c?
Where are c variables stored in memory?
How does placing some code lines between the comment symbol help in debugging the code?
`write a program to display the recomended action depends on a color of trafic light using nested if statments
What is FIFO?
How to throw some light on the b tree?