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

Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.

3162


Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?

1237


What is cohesion in c?

966


How to get string length of given string in c?

1051


What is default value of global variable in c?

971


What is include directive in c?

1141


What is meant by keywords in c?

1065


How will you print TATA alone from TATA POWER using string copy and concate commands in C?

1359


Why is it important to memset a variable, immediately after allocating memory to it ?

2052


is it possible to create your own header files?

1091


What is the use of parallelize in spark?

1015


What is the difference between malloc() and calloc()?

1808


What is size of union in c?

1004


What are global variables and explain how do you declare them?

1085


What is the advantage of using #define to declare a constant?

1078