Advertisement
Nofxthepirate

Exercise 2.30

Jan 24th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. //Exercise 2.30
  2. //This program accepts weight and height, and calculates BMI
  3. #include <iostream>
  4. using namespace std;
  5.  
  6.  
  7. int main(){
  8.     double height{}, weight{};
  9.     cout << "Please input your height in inches and weight in pounds: " << endl;
  10.     cin >> height >> weight;
  11.     cout << "Your BMI is " << (weight * 703) / (height * height) << endl;
  12.     cout << "\n" "BMI VALUES\n"
  13.     "Underweight: less than 18.5\n"
  14.     "Normal:      between 18.5 and 24.9\n"
  15.     "Overweight:  between 25 and 29.9\n"
  16.     "Obese:       30 or greater" << endl;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement