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
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 “****”.
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
What is cohesion in c?
How to get string length of given string in c?
What is default value of global variable in c?
What is include directive in c?
What is meant by keywords in c?
How will you print TATA alone from TATA POWER using string copy and concate commands in C?
Why is it important to memset a variable, immediately after allocating memory to it ?
is it possible to create your own header files?
What is the use of parallelize in spark?
What is the difference between malloc() and calloc()?
What is size of union in c?
What are global variables and explain how do you declare them?
What is the advantage of using #define to declare a constant?