C++ program to convert a length given in feet and inches to centimeters.


If there is any length given in feet and inches then you can use this code to convert it into cm.
ex-if length is 3 feet and 8 inches then your fwill be=3.8c++ code

#include <iostream.h> #include <conio.h> void main() { clrscr(); float f; cout<<"Enter height in feet and inches : "; cin>>f; cout<<"\nHeight in cm = "<<f*12*2.54; getch(); }
OUTPUT-Enter height in feet and inches : 3.8 Height in cm =115.824

Comments :

Post a Comment