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 / gayathri
include<stdio.h>
void main()
{
int miles;
double inch,feet;
long cm,km;
printf("Enter how many miles");
scanf("%d",&miles);
feet=5280*miles;
inch=feet*12;
cm=inch*2.54;
km=(cm/100000);
printf("Distance in KM:%lf"+km);
}
I did not compile the program,i wrote it directly
If there are any errors please specify........
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What are global variables and how do you declare them?
Difference between exit() and _exit() function?
how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?
What are external variables in c?
Why is it that not all header files are declared in every C program?
Tell us something about keyword 'auto'.
What is character set?
Who is the founder of c language?
What is non linear data structure in c?
hi, which software companys will take,if d candidate's % is jst 55%?
Why can’t constant values be used to define an array’s initial size?
What is getch () for?
the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function
Why should I prototype a function?
What is call by reference in functions?