#include <iostream>
#include <iomanip>

using namespace std;

double getBMI(int, int);
string getStatus(double);

int main()
{
	int weight, height;
	double bmi;
	string status;
	
	//put weight in kilogram
	cout << "Enter weight in KG: ";
	cin >> weight;
	
	//put height in inch
	cout << "Enter height in Inch: ";
	cin >> height;
	
	//calling getBMI function
	bmi = getBMI(weight, height);
	cout << fixed << setprecision(1) << "Your BMI: " << bmi << endl;
	
	//calling getStatus function
	status = getStatus(bmi);
	cout << "BMI status: " << status << endl;
	
	return 0;
}

double getBMI(int weight, int height){
	
	double heightInMeter = height * 0.0254;
	return weight / (heightInMeter * heightInMeter);
}

string getStatus(double bmi){
	string Status = "";
	
	if (bmi >= 30) {
		Status = "obese";
	} else if (bmi >= 25 && bmi < 30){
		Status = "overweight";
	} else if (bmi >= 18.5 && bmi < 25){
		Status = "normal weight";
	} else if (bmi < 18.5){
		Status = "underweight";
	}
	
	return Status;
}
