i want to make a program in which we use input having four
digits(4321) and get output its reciprocal(1234).
Answer / 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 |
What is the explanation for prototype function in c?
What are different types of operators?
to get a line of text and count the number of vowels in it
what is difference between ANSI structure and C99 Structure?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
What is the purpose of main( ) in c language?
what is foreign key in c language?
What are the advantages of the functions?
WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c file management?
28 Answers 3D PLM, Code Studio, Deltech, IBM,
What's the difference between DELETE TABLE and TRUNCATE TABLE commands?
main() { int i=400,j=300; printf("%d..%d"); }
2. Write a function called hms_to_secs() that takes three int values—for hours, minutes, and seconds—as arguments, and returns the equivalent time in seconds.. Create a program that exercises this function by repeatedly obtaining a time value in hours, minutes, and seconds from the user (format 12:59:59), calling the function, and displaying the value of seconds it returns.