Answer Posted / rajan praksh more (vangani-tha
#include<stdio.h>
#include<conio.h>
void main()
{
int rem,a;
int sum=0;
clrscr();
printf("Enter The Number: ");
scanf("%d",&a);
while(a>0)
{
rem=a%10;
sum=sum+rem;
a=a/10;
}
printf("sum of digits of entered number is =%d",sum);
getch();
}
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Is c is a middle level language?
When should structures be passed by values or by references?
a program that can input number of records and can view it again the record
What is the use of bitwise operator?
How can I make sure that my program is the only one accessing a file?
what do the 'c' and 'v' in argc and argv stand for?
main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }
What are the keywords in c?
Explain enumerated types.
In C language what is a 'dangling pointer'?
Can you please explain the difference between malloc() and calloc() function?
Why do we write return 0 in c?
Why is this loop always executing once?
Ow can I insert or delete a line (or record) in the middle of a file?
hi any body pls give me company name interview conduct "c" language only