C program for conver kilometer into inch ,feet,centimeter and meter
#include<stdio.h>
#include<conio.h>
void main()
{
float km,m,cm,ft,inch;
clrscr();
printf("enter the distance in kilometres ");
scanf("%f",&km);
m=km*1000;
cm=m*100;C
inch=cm/2.54;
ft=inch/12;
printf(" distance in meters is %f",m);
printf(" distance in centimetres is %f",cm);
printf(" distance in feet is %f",ft);
printf(" distance in inches is %f",inch);
getch();
}
#include<conio.h>
void main()
{
float km,m,cm,ft,inch;
clrscr();
printf("enter the distance in kilometres ");
scanf("%f",&km);
m=km*1000;
cm=m*100;C
inch=cm/2.54;
ft=inch/12;
printf(" distance in meters is %f",m);
printf(" distance in centimetres is %f",cm);
printf(" distance in feet is %f",ft);
printf(" distance in inches is %f",inch);
getch();
}
No comments
Post a Comment