Question: #include class BMI { private: double height; double weight; public: BMI(double height, double weight) { this->height = height; this->weight = weight; } int BodyMassIndex() {

#include class BMI

{

private:

double height;

double weight;

public:

BMI(double height, double weight)

{

this->height = height;

this->weight = weight;

}

int BodyMassIndex()

{

double bmIndex;

bmIndex = weight / (height * height);

return int(bmIndex + .5);

}

void BMIStatus()

{

int BMIValue = BodyMassIndex(weight, height);

if (BMI < 18)

cout << "Underweight" << endl;

else if (BMI <= 25) cout << "Normal" << endl;

else cout << "Overweight" << endl;

}

};

HOW CAN I CREATE THE MAIN() AND RUN THE CODE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!