Answer Posted / giri
#include <stdio.h>
#include <conio.h>
void main()
{
int sum=0, num, mul=1;
printf("Enter the number");
scanf("%d", &num);
while(num)
{
sum = sum + ((num%10)*mul);
num = num/10;
mul = mul * 10;
}
printf("Sum is %d", sum);
}
Is This Answer Correct ? | 6 Yes | 7 No |
Post New Answer View All Answers
What do you mean by Recursion Function?
What is the difference between ++a and a++?
What are Macros? What are its advantages and disadvantages?
What is structure padding in c?
Why is c called a mid-level programming language?
Explain how do you determine a file’s attributes?
What is use of integral promotions in c?
How can I delete a file?
Can stdout be forced to print somewhere other than the screen?
Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor
Linked lists -- can you tell me how to check whether a linked list is circular?
What does the error message "DGROUP exceeds 64K" mean?
Is python a c language?
When can a far pointer be used?
Write a code to determine the total number of stops an elevator would take to serve N number of people.