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
What does. int *x[](); means ?
application attempts to perform an operation?
Explain how do you determine the length of a string value that was stored in a variable?
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm
how to find binary of number?
What's the total generic pointer type?
What is identifier in c?
i want to switch my career from quailty assurance engineering to development kindly guide me from which programming language its better for me to start plz refer some courses or certifications too i have an experience of 1.5 yrs in QA field.Kindly guide me
In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.
What is the difference between variable declaration and variable definition in c?
What is the difference between malloc() and calloc() function in c language?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
What is the best way to comment out a section of code that contains comments?
I need a sort of an approximate strcmp routine?
In a switch statement, what will happen if a break statement is omitted?