Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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 UNDERWEIGHTStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started