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


Please Help Members By Posting Answers For Below Questions

Explain how do you override a defined macro?

579


What is the difference between int main and void main?

571


What is the difference between exit() and _exit() function in c?

578


What is the purpose of 'register' keyword?

683


If null and 0 are equivalent as null pointer constants, which should I use?

575






What is the use of volatile?

604


"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

652


How can I avoid the abort, retry, fail messages?

655


What is difference between constant pointer and constant variable?

626


Can static variables be declared in a header file?

612


a c code by using memory allocation for add ,multiply of sprase matrixes

2297


What is the difference between near, far and huge pointers?

628


How many levels of indirection in pointers can you have in a single declaration?

589


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.

594


What does c mean before a date?

585