Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Can you please explain the difference between syntax vs logical error?

1200


Mention four important string handling functions in c languages .

1120


Is python a c language?

1020


Why do we use stdio h and conio h?

1101


What is c definition?

1284


What are identifiers c?

1099


Why doesnt this code work?

1074


What are the features of the c language?

1092


the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b

2686


What is difference between class and structure?

1122


What does the file stdio.h contain?

1074


What is a protocol in c?

1016


Can you please explain the difference between exit() and _exit() function?

1039


List some of the static data structures in C?

1205


Are the variables argc and argv are local to main?

1324