Hi , need help here I am still new to programming. I am answering a question that requires me to validate 2 variables height and weight using a while loop , which will be repeated until height is more than 1.8 and weight less than 100 . My code is compiling then when i enter values it just gets stuck . There is no error message but green highlights on #include <iostream> and int main () . so i cant find what is wrong with my declarations .
#include <iostream>
usingnamespace std;
int main()
{
float height;
int weight;
cout <<"Please key in the height followed by the weight:";
cin >> height >> weight ;
while (height <= 1.8 || weight >= 100);
{
cout <<"Wrong: Height should be more than 1.8 ";
cout <<"and weight should be less than 100";
cout <<"Enter height:";
cin >> height;
cout <<"Enter weight:";
cin >> weight;
}
cout <<"Height:" << height << "weight:" << weight << endl;
return 0;
}