can anyone fix this?...im having some error in this c++ code.
#include <iostream>
#include <string>
using namespace std;
class Person{
public:
string name;
int age;
float weight;
float height;
float bmi()
{
bmi = (weight/(height*height))*10000;
return bmi;
}
string status()
{
if(bmi<18.5){
status ="Underweight";
}
else if(bmi>25.99 && bmi<30.01){
status ="Overweight";
}
else if(bmi>30.99 && bmi<40.01){
status ="Obese";
}
else{
status ="Normal Weight";
}
return status;
}
};
int main(){
Person person;
cout << "Name = ";
cin >> person.name;
cout << "Age = " ;
cin >> person.age;
cout << "Weight = ";
cin >> person.weight;
cout << "Height = ";
cin >> person.height;
cout << "Bmi = " << person.bmi();
cout << "Status = " << person.status();
return 0;
}