Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ simple programming style 5. (6 pts) Complete the following C++ program. The program prompts the user to enter the BMI value, and assigns an

c++ simple programming style
image text in transcribed
5. (6 pts) Complete the following C++ program. The program prompts the user to enter the BMI value, and assigns an appropriate value to the string variable status based on one's BMI value. The multiway decision statement (if-else if-else) is required to determine the appropriate assignment. . . A BMI below 18.5 is considered underweight. A BMI of 18.5 to 24.9 is considered healthy. A BMI of 25 to 29.9 is considered overweight. A BMI of 30 or higher is considered obese. #include using namespace std; Il include the appropriate header file here int main() float value; string status; // used to store the BMI value // used to store the status value // Prompt the user and read the BMI value cout > value; to assige salue to variable // Show the code to assign an appropriate status value based on the BMI value if(value L 18.5) cout ch"Your health statica isi" Le status LC endl; felse if (18.5 [value gf value ( 24.9% Coute "Your health status is: "LL status, else if (25 L=value is value - 29.9) cont ca "Your health status is" Le status; else if (value> 30). statis cout

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

Recommended Textbook for

Semantics Of A Networked World Semantics For Grid Databases First International Ifip Conference Icsnw 2004 Paris France June 2004 Revised Selected Papers Lncs 3226

Authors: Mokrane Bouzeghoub ,Carole Goble ,Vipul Kashyap ,Stefano Spaccapietra

2004 Edition

3540236090, 978-3540236092

More Books

Students also viewed these Databases questions

Question

Explain the causes of indiscipline.

Answered: 1 week ago

Question

Explain the factors influencing wage and salary administration.

Answered: 1 week ago