Write a Program to convert the distance from meter to cm and inches
#include<stdio.h>
main()
{
float m,cm,inch;
printf("Enter value of Distance in meter \n");
scanf("%f",&m);
cm=m*1000;
inch=cm/2.54;
printf("Converted value in Centimeter = %f \n",cm);
printf("Converted value in Inches = %f \n",inch);
}
/*
INPUT :
Enter value of Distance in meter
57
OUTPUT :
Converted value in Centimeter =
57000.000000
Converted value in Inches =
22440.945313
*/
Comments
Post a Comment