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
Can we use any name in place of argv and argc as command line arguments?
What is indirection in c?
Is boolean a datatype in c?
What are the functions to open and close the file in c language?
Can you please explain the difference between strcpy() and memcpy() function?
What are variables c?
Stimulate calculator using Switch-case-default statement for two numbers
What is variable initialization and why is it important?
There seem to be a few missing operators ..
Is a house a shell structure?
What is the use of pragma in embedded c?
In a switch statement, what will happen if a break statement is omitted?
What is the use of ?
What is the use of pointers in C?
What is pointer and structure in c?