Saturday, 22 March 2014

DISTANCE CONVERTOR

SOURCE CODE

#include<stdio.h>
#include<conio.h>
void main (void)
{
   float km,m,feet,inch,cm;
   clrscr();
   printf("The distance between two cities in kilometre=");
   scanf("%f",&km);
   m=km*1000;
   printf("\nThe distance in metre is=%.2f",m);
   scanf("&f",&km);
   feet=km*3280.84;
   printf("\nThe distance in feet is=%.2f",feet);
   scanf("&f",&km);
   inch=km*39370.1;
   printf("\nThe distance in inch is=%.2f",inch);
   scanf("&f",&km);
   cm=km*100000;
   printf("\nThe distance in centimetre is=%.2f",cm);
   getch();
}

OUTPUT








No comments:

Post a Comment