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

What is null in c?

1075


What are the similarities between c and c++?

1059


Can the “if” function be used in comparing strings?

1033


Explain what is dynamic data structure?

1147


Is c language still used?

963


What are the general description for loop statement and available loop types in c?

1107


What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.

4271


Can a pointer be static?

1058


Write a program to print fibonacci series without using recursion?

1112


Do you know pointer in c?

1029


What is sorting in c plus plus?

960


Explain what is meant by high-order and low-order bytes?

1036


What is a keyword?

1156


What does the message "automatic aggregate intialization is an ansi feature" mean?

1177


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.

1095