/*WAP to convert the value kilometer , cm , feet , inch*/ #include<stdio.h> #include<conio.h> void main() { float km,m,cm,inch,ft; clrscr(); printf("\tenter the value in kilometer:"); scanf("%f",&km); m=1000*km; printf("\n\t\tvalue in meters:%.2f",m); cm=100*m; printf("\n\t value in centimeters:%.2f",cm); inch=cm/2.54; printf("\n\t\tvalue in inches:%.2f",inch); ft=inch/12; printf("\n\t\t value of feet:%.2f",ft); getch(); }
No comments:
Post a Comment