Answer Posted / ruchi
#include<stdio.h>
#include<conio.h>
int main()
{
int n,m,d,m1,s=0,s1;
printf("enter the number ");
scanf("%d",&n);
m=n%10;
d=n/10;
while(d>=10)
{
m1=d%10;
d=d/10;
s=s+m1;
}
s1=s+m+d;
printf("\nThe sum of digits is ");
printf("%d",s1);
getch();
}
| Is This Answer Correct ? | 7 Yes | 11 No |
Post New Answer View All Answers
Explain how do you determine a file’s attributes?
What is the modulus operator?
what is the role you expect in software industry?
What functions are in conio h?
How many levels of pointers can you have?
What is .obj file in c?
Is return a keyword in c?
What is the use of printf() and scanf() functions?
What are the main characteristics of c language describe the structure of ac program?
What is the difference between new and malloc functions?
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above
given post order,in order construct the corresponding binary tree
What is a pointer variable in c language?
Do you know null pointer?
can anyone suggest some site name..where i can get some good data structure puzzles???