Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

c. What were you expected to do when you grew up?

Answered: 1 week ago

Question

4. Describe how cultural values influence communication.

Answered: 1 week ago

Question

3. Identify and describe nine cultural value orientations.

Answered: 1 week ago