Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 3 : Write a program to calculate Body Mass Index ( BMI ) and display a message about the diagnosis of BMI. The program

Problem 3: Write a program to calculate Body Mass Index (BMI) and display a message about the diagnosis of BMI. The program prompts the user to input his/her valid height in cm(height >30cm) and valid weight in lb(weight >51lb). The program then converts units from cm to m, and from lb to kg. BMI is calculated as BMI=weight(KG)height(m)2. The program displays a message according to the values of the diagnosis of BMI as follows:
\table[[BMI,Message],[BMI 18.5,Under weight],[18.5 BMI 25,Congratulations, you have an ideal weight],[BMI >25,Over weight]]
Input /Output Samples:
Bnter weight in lb and height in cm:56 Your weight or height is incorrect
Bnter weight in 15 and height in cm : 120180 your weight in KG=54 your height in M-1.8 your BMI is 16.6667 and you are under weight
Enter weight in 1b and height in cm: 175185
your weight in KG=78.75
your height in M=1.85
your BMI is 23.0095. Congratulations, you have an ideal weight!
Enter weight in Ib and height in cm: 200180
your weight in KG=90
your height in M=1.8
your BMI is 27.7778, and you are over weight
I need answer with c++
image text in transcribed

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

Logic In Databases International Workshop Lid 96 San Miniato Italy July 1 2 1996 Proceedings Lncs 1154

Authors: Dino Pedreschi ,Carlo Zaniolo

1st Edition

3540618147, 978-3540618140

More Books

Students also viewed these Databases questions