Question: C++ Write a program that asks the user to enter two positive numbers as his/her height (inches) and weight (pounds). If the entered height is

 C++ Write a program that asks the user to enter two

C++

Write a program that asks the user to enter two positive numbers as his/her height (inches) and weight (pounds). If the entered height is less than 30 inches or greater than 90 inches, the program will keep asking the user to enter a valid height. If the entered weight is less than 20 pounds or greater than 700 pounds, the program will keep asking the user to enter a valid weight. The program outputs BMI. If BMI=35, print the message EXTREMLY OBESE. Below are 4 samples to show how the program runs. ( weight in pounds x 703) BMI = height in inches? Sample1: Height in inches? 72 Weight in pounds? 150 BMI: 20.3414 NORMAL Sample3: Height in inches? 72 Weight in pounds? 15 Please enter a valid weight: 800 Please enter a valid weight: 200 BMI: 27.1219 OVERWEIGHT Sample2: Height in inches? 76 Weight in pounds? 10 Please enter a valid weight: 300 BMI: 36.5132 EXTREMLY OBESE Sample 4: Height in inches? 20 Weight in pounds? 15 Please enter a valid height: 25 Please enter a valid height: 29 Please enter a valid height: 35 Please enter a valid weight: 25 BMI: 14.3469 UNDERWEIGHT

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!