Thursday, January 17, 2013

C Language Example # 05 Distance Calculator Using C (Includes KM, Meter, Feet, Inch, Centimeter)

C Language Example # 05 Distance Calculator Using C (Includes KM, Meter, Feet, Inch, Centimeter).

Lets find the difference between to places using C Language !

C Language Code:

//Written by Latest Technology Guide    
//Title : Example 04 : Find Age of the Person by asking their birth year and current year.

#include <stdio.h>

#include <conio.h>
void main()
float km1,km2;

printf("Enter KM 1:");

printf("Enter KM 2:");

printf("\nDifference in KM is         :%.2f",km2-km1);
printf("\nDifference in Meter is      :%.2f",(km2-km1)*1000);
printf("\nDifference in Feet is       :%.2f",(((km2-km1)*1000)/3.0));
printf("\nDifference in Inch is       :%.2f",((((km2-km1)*1000)/3.0)/12));
printf("\nDifference in Centimeter is :%.2f",(((km2-km1)*1000)/12.0));



We think there is no need of Output for this program.

Explanation of C Language Example # 05 : Distance Calculator Using C (Includes KM, Meter, Feet, Inch, Centimeter).

* Enter KM1 and KM2.
* Program will calculate the difference in Kilo Meter (KM), Meter, Feet, Inch and Centimeter.

Note: All programs are developed and tested using Turbo C++ 3.0 under Windows XP. We just want to provide guidelines to the users. If you are using any other Compiler or other operating system they you need to modify this program as per your requirements. 


  1. thank you for sharing nice article in your blog
    web tutorial programming

  2. Positive site, where did u come up with the information on this posting? I'm pleased I discovered it though, ill be checking back soon to find out what additional posts you include. entfernung zwischen