Thursday, 30 August 2012

The distance between two cities (in km.) is input through the keyboard. Write a program to convert and print this distance in meters, feet, inches and centimeters.

 float D_km,D_m,D_f,D_i,D_cm;
 printf("\nEnter distance in Kilometers\n");
 printf("After conversion of %f km result is :-\n ",D_km);
 printf("\nmeter = %f m\n",D_m);
 printf("feet = %f foot\ninches = %f inches\n",D_f,D_i);
 printf("centimeter = %f cm",D_cm);


1 comment:

  1. amit plz tel me the the simple program to convert distanse between two cities in kilometers and convert it into meters, inches and centimeters