//C++ Primer Plus -- Chapter 3--2
#include<iostream>
const double k_to_pound=2.2;
const int inch_to_feet=12;
const double inch_to_meter=0.0254;
int main (void)
{
using namespace std;
int inch,feet;
cout<<"Please enter your height as how many inches and feet:";
cin>>inch>>feet;
double pound;
cout<<"Please enter your weight:";
cin>>pound;
double meter=(inch+feet*inch_to_feet)*inch_to_meter;
double kilo=pound/k_to_pound;
double BMI=kilo/(meter*meter);
cout<<"The body mass index is: "<<BMI<<endl;
system("pause");
return 0;
}