76 296
Assignments Done
Successfully Done
In May 2019

Answer to Question #23782 in C++ for EMMANUEL

Question #23782
write a program which inputs a person's height (in centimeters) and weight (in kilograms) and outputs one of the messages: UNDERWEIGHT , NORMAL , OR OVERWEIGHT , using the criteria:
UNDERWEIGHT : weight <height/2.5
NORMAL : height/2.5<=weight<=height/2.3
OVERWEIGHT : height/2.3 < weight
Expert's answer
#include <conio.h>
#include <iostream>

using namespace std;

void main()
int height, weight;

cout << "Enter a person's height in centimeters: ";
cin >> height;

cout << "Enter a person's weight in kilograms: ";
cin >> weight;
cout << endl;

if (weight < height / 2.5)
cout << "UNDERWEIGHT";
else if (height / 2.3 < weight)
cout << "OVERWEIGHT";
cout << "NORMAL";

cout << endl;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions