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

Should I learn c before c++?

1197


Explain the difference between the local variable and global variable in c?

1046


How do you define CONSTANT in C?

1234


What are header files and explain what are its uses in c programming?

1092


What are the 4 types of organizational structures?

1060


What is a keyword?

1144


What is chain pointer in c?

1031


Is null equal to 0 in sql?

1111


What is a union?

1002


How do I get a null pointer in my programs?

1083


how to build a exercise findig min number of e heap with list imlemented?

2043


What is meant by preprocessor in c?

979


Explain how can you be sure that a program follows the ansi c standard?

1433


Is calloc better than malloc?

995


When should the register modifier be used? Does it really help?

940