hello friends....
TAKE THE FIRST STEP TO KNOWLEDGE FRIENDS BECAUSE KNOWLEDGE IS FREE.
>> /* THE DISTANCE BETWEEN TWO CITIES (IN KM) IS INPUT THROUGH KEY BOARD. WRITE A PROGRAM TO CONVERT AND PRINT THIS DISTANCE IN METERS, FEET, INCHES, & CENTIMETERS. */
#include<stdio.h>
#include<conio.h>
void main ()
{
float km,feet,inches,cm,meater;
clrscr();
printf("enter distance between tow citi : \n");
scanf("%f",&km);
meater=km*1000;
feet=km*3284.84;
inches=km*39370.079;
cm=km*100000;
printf("distance in meater : %f\n",meater);
printf("distance in feet : %f\n",feet);
printf("distance in inches : %f\n",inches);
printf("distance in cm : %f\n",cm);
getch();
}
/* OUTPUT */
==========================
enter distance between tow citi :
4
distance in meater : 4000.000000
distance in feet : 13139.360352
distance in inches : 157480.312500
distance in cm : 400000.000000
* * * * * * * * * * * * * *http://www.dnpdeveloper.com
if you have like this blog so share and subscribe, comment for this blog.
if your any question, so comment pleass.
MY INSTAGRAM ID : dnp176
Comments
Post a Comment