#include <iostream> using namespace std; int main() { string name; int weight; int height; float bmi; cout << "What is your name?" << endl; cin >> name; cout << "What is your total weight (lbs.)?" << endl; cin >> weight; cout << "What is your height (inches) [1 foot = 12 inches]?" << endl; cin >> height; bmi = weight / (height * height) * 703; cout << name << "'s BMI is " << bmi << endl; return 0; }
bmi = weight / (height * height) * 703;
bmi = weight * 703 / (height * height);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)