5. distance conversion:
Convert a distance from miles to kilometers .there are 5280
feets per mile,12 inches per foot .2.54 centimeters per
inch and 100000centimeters per kilometer
Answer Posted / sindhu
#include<stdio.h>
#include<conio.h>
main()
{
double km,mile;
printf(" enter distance in miles");
scanf("%f",&mile);
km=5280*12*2.54*100000*mile;
printf("
distance in km is %f",km);
getch();
}
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain how do you override a defined macro?
What is the difference between int main and void main?
What is the difference between exit() and _exit() function in c?
What is the purpose of 'register' keyword?
If null and 0 are equivalent as null pointer constants, which should I use?
What is the use of volatile?
"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks
How can I avoid the abort, retry, fail messages?
What is difference between constant pointer and constant variable?
Can static variables be declared in a header file?
a c code by using memory allocation for add ,multiply of sprase matrixes
What is the difference between near, far and huge pointers?
How many levels of indirection in pointers can you have in a single declaration?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
What does c mean before a date?