/* This program takes lenght in kilo-meters from user, converts it into meters,
centimeters, feet and inches and then
shows results .*/
#include<stdio.h>
#include<conio.h>
int main ()
{
/*delaring and initializing variables*/
float km=0, meter=0, cm=0, feet=0, inch=0;
/*prompt for input*/
printf("Please enter the distance in 'kilo meters': ");
/*taking length in kilo-meters as input*/
scanf("%f",&km);
/*calculations*/
meter =
km * 1000;
cm =
meter * 100;
feet = meter * 3.280839895;
inch =
feet * 12;
/*showing results*/
printf("Here is the conversion of %f km",km);
printf("\n\n In
Meters: %f m \n\n In Centi Meters: %f cm \n\n
In Feet: %f feet \n\n In inches: %f inch ",meter,cm,feet,inch);
getche();
return 0;
}
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteflow chart
ReplyDeleteSo i am attached to products write-up. It truly is good for explore families verbalize at the cardiovascular system aside from awareness to achieve success critical look is invariably simply just noticed. UKdistance
ReplyDeleteThank you very much for the sharing! COOL.. entfernung zwischen
ReplyDeleteThanks u
ReplyDeleteRead next: C Program to convert distance in meters, feet, inches, and centimeters
ReplyDelete