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 is auto keyword in c?

1208


The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?

1212


What is nested structure in c?

1069


What are type modifiers in c?

1054


Tell me what are bitwise shift operators?

1132


What is this pointer in c plus plus?

1093


What are different storage class specifiers in c?

1096


How do you search data in a data file using random access method?

1307


How do you determine whether to use a stream function or a low-level function?

1127


If null and 0 are equivalent as null pointer constants, which should I use?

1223


Why array is used in c?

1017


What are variables and it what way is it different from constants?

1244


What are the different types of endless loops?

1082


Using which language Test cases are added in .ptu file of RTRT unit testing???

4287


Explain how are portions of a program disabled in demo versions?

1123