/* Distance Between Two Cities Kilometer To Meters,Feet,Inches,and
Centimeters */
/* The Distance Between Two Cities In KM is Input Through The Keyboard. Write A
Programe To Convert And Print This Distance In Meters,Feet,Inches,and
Centimeters */
/* Suchetan Dey */
#include<stdio.h>
#include<conio.h>
void main()
{
int km;
float meters,foot,inch,centimeters;
printf("Enter The Kilometer ");
scanf("%d",&km);
meters=km*1000;
printf("%d Kilometer = %.2f Meter \n",km,meters);
foot=km*3280.84;
printf("%d Kilometer = %.2f Feet \n",km,foot);
inch=km*39370.1;
printf("%d Kilometer = %.2f Inch \n",km,inch);
centimeters=km*100000;
printf("%d Kilometer = %.2f Centimeter \n",km,centimeters);
getch();
}
The Output is :-
Centimeters */
/* The Distance Between Two Cities In KM is Input Through The Keyboard. Write A
Programe To Convert And Print This Distance In Meters,Feet,Inches,and
Centimeters */
/* Suchetan Dey */
#include<stdio.h>
#include<conio.h>
void main()
{
int km;
float meters,foot,inch,centimeters;
printf("Enter The Kilometer ");
scanf("%d",&km);
meters=km*1000;
printf("%d Kilometer = %.2f Meter \n",km,meters);
foot=km*3280.84;
printf("%d Kilometer = %.2f Feet \n",km,foot);
inch=km*39370.1;
printf("%d Kilometer = %.2f Inch \n",km,inch);
centimeters=km*100000;
printf("%d Kilometer = %.2f Centimeter \n",km,centimeters);
getch();
}
The Output is :-
ReplyDeleteC Program to convert distance in meters, feet, inches, and centimeters