Changing Kilometer into Meter,Centimeter,Inch,Foot,Yard&Mile By using C

#include<stdio.h>
#include<conio.h>
void main()
{
float kilometer,meter,centimeter,inch,foot,yard,mile;
clrscr();
printf(“Enter your journey in kilometer=”);
scanf(“%f”,&kilometer);
meter=kilometer*1000;
centimeter=100*meter;
inch=centimeter/2.54;
foot=inch/12;
yard=foot/3;
mile=yard/1760;
printf(“Meter=%0.2f\nCentimeter=%0.2f\n”,meter,centimeter );
printf(“Inch=%0.2f\nFoot=%0.2f\nYard=%0.2f\nMile=%0.2f\n”,inch,foot,yard,mile);
getch();
}

After Running Program 🙂

 

Leave a Reply