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
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
What is variable declaration and definition in c?
Is file a keyword in c?
what is the structure pointer?
What is methods in c?
Explain what are the different file extensions involved when programming in c?
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
Is there any demerits of using pointer?
What is the explanation for modular programming?
Write a code of a general series where the next element is the sum of last k terms.
how do you execute a c program in unix.
The difference between printf and fprintf is ?
What is the purpose of 'register' keyword?
What is a program flowchart and how does it help in writing a program?
What is property type c?