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
What is getch?
what is different between auto and local static? why should we use local static?
What are shell structures used for?
Why do we use c for the speed of light?
what is the format specifier for printing a pointer value?
I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.
How are structure passing and returning implemented?
How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?
how logic is used
Can you subtract pointers from each other? Why would you?
What is meant by realloc()?
What are qualifiers and modifiers c?
Can we declare variable anywhere in c?
What is the difference between fread and fwrite function?
What are the types of arrays in c?