Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Exercise 2.30
- //This program accepts weight and height, and calculates BMI
- #include <iostream>
- using namespace std;
- int main(){
- double height{}, weight{};
- cout << "Please input your height in inches and weight in pounds: " << endl;
- cin >> height >> weight;
- cout << "Your BMI is " << (weight * 703) / (height * height) << endl;
- cout << "\n" "BMI VALUES\n"
- "Underweight: less than 18.5\n"
- "Normal: between 18.5 and 24.9\n"
- "Overweight: between 25 and 29.9\n"
- "Obese: 30 or greater" << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement