Answer Posted / d. prashant
#include<stdio.h>
#include<conio.h>
main()
{
int n,i,sum=0,r;
printf("enter the value");
scanf("%d",&n);
while(n)
{
rem=num%10;
sum=sum+rem;
num=num/10;
}
printf("sum = %d",sum);
}
Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
how many errors in c explain deply
Explain how do I determine whether a character is numeric, alphabetic, and so on?
How can variables be characterized?
Do string constants represent numerical values?
How can I access an I o board directly?
What is the difference between pure virtual function and virtual function?
how to construct a simulator keeping the logical boolean gates in c
What are comments and how do you insert it in a C program?
What is variable declaration and definition in c?
What is operator promotion?
How can you increase the size of a statically allocated array?
List some applications of c programming language?
What is malloc return c?
plz let me know how to become a telecom protocol tester. thank you.
An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above