Write a C program to enter a distance in to kilometre and convert it in to meter, feet, inches and centimetre.

#include <stdio.h>

int main() 
{
 float km;
 printf("Enter Length in KiloMeter : ");
 scanf("%f",&amp;km);
 printf("\n %.2f KM = %.2f Meters",km,km*1000);
 printf("\n %.2f KM = %.2f Feets",km,km*3280.84);
 printf("\n %.2f KM = %.2f Inches",km,km*39370.08);
 printf("\n %.2f KM = %.2f Centimeters",km,km*1000*100);
 return 0;
}

Next practical link : Practical 6

Categories: GTU PRACTICALSPPS

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *