Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to find out the reverse number of a digit if it is
input through the keyboard?

Answer Posted / haris

Try it. It will seriously work. You would appreciate it.


#include<stdio.h>
#include<conio.h>

int main()

{
int x;
int a,b,c,d,e,f,g,h,i;
int sum;

printf("Please enter a five digit number:\n");
scanf("%d",&x);

a=x%10;
b=(x/10)% 10;
c=(x/100)% 10;
d=(x/1000)%10;
e=(x/10000)%10;
f=a*10000;
g=b*1000;
h=c*100;
i=d*10;


sum=f+g+h+i+e;

printf("\n\nThe sum of all digits is %d.",sum);

getch();
return 0;

}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do header files do?

1019


How can I read and write comma-delimited text?

1010


What is a scope resolution operator in c?

1206


Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent

2074


How can I read data from data files with particular formats?

1003


write a c program to print the next of a particular no without using the arithmetic operator or looping statements?

3841


Difference between Shallow copy and Deep copy?

1969


What is the difference between struct and union in C?

1242


Explain pointer. What are function pointers in C?

1016


What is s or c?

1014


Is c still used?

999


a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f

2079


How do we make a global variable accessible across files? Explain the extern keyword?

1827


Write a c program to build a heap method using Pointer to function and pointer to structure ?

4622


the question is that what you have been doing all these periods (one year gap)

2017