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...

i want to make a program in which we use input having four
digits(4321) and get output its reciprocal(1234).

Answer Posted / fcuker

#include <stdio.h>

int main() {
int x;
scanf("%d", &x);
while (x > 0) {
printf("%d", x % 10);
x = x / 10;
}
return 0;
}

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we use any name in place of argv and argc as command line arguments?

1036


What is indirection in c?

1037


Is boolean a datatype in c?

1022


What are the functions to open and close the file in c language?

1002


Can you please explain the difference between strcpy() and memcpy() function?

1029


What are variables c?

1007


Stimulate calculator using Switch-case-default statement for two numbers

2935


What is variable initialization and why is it important?

1184


There seem to be a few missing operators ..

1014


Is a house a shell structure?

1123


What is the use of pragma in embedded c?

1018


In a switch statement, what will happen if a break statement is omitted?

1023


What is the use of ?

1008


What is the use of pointers in C?

1039


What is pointer and structure in c?

1100