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 is event driven software and what is procedural driven software?
What are the types of data structures in c?
In a switch statement, what will happen if a break statement is omitted?
What does #pragma once mean?
Explain the meaning of keyword 'extern' in a function declaration.
How do you construct an increment statement or decrement statement in C?
What is the purpose of the preprocessor directive error?
Difference between pass by reference and pass by value?
How can type-insensitive macros be created?
What is static memory allocation? Explain
Can we replace the struct function in tree syntax with a union?
Explain how can I pad a string to a known length?
Explain what is the purpose of "extern" keyword in a function declaration?
write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.
Why header file is used in c?