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

Can you mix old-style and new-style function syntax?

1071


How is a structure member accessed?

1077


explain what is a newline escape sequence?

1055


write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays

2199


What is the difference between struct and typedef struct in c?

1099


What is FIFO?

1572


What are the benefits of organizational structure?

986


Can the sizeof operator be used to tell the size of an array passed to a function?

1076


Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?

1090


Are global variables static in c?

1128


what will be maximum number of comparisons when number of elements are given?

1867


Who invented b language?

1360


Can we declare a function inside a function in c?

1006


What is linear search?

1096


Compare interpreters and compilers.

1039