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
Here is a good puzzle: how do you write a program which produces its own source code as output?
Hi can anyone tell what is a start up code?
Is c# a good language?
In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.
Differentiate Source Codes from Object Codes
What are the types of i/o functions?
Why doesnt that code work?
hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...
Explain pointers in c programming?
Does c have function or method?
Is linux written in c?
Compare and contrast compilers from interpreters.
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
Why is this loop always executing once?
Explain the difference between call by value and call by reference in c language?