Question: #include #include using namespace std; int main() { int height = 0, weght = 0; double bmi; string name; // prompt user for their data

#include #include using namespace std;

int main() { int height = 0, weght = 0; double bmi; string name; // prompt user for their data cout << "What is your name? "; cin >> name; cout << "Please enter your height in inches: "; cin >> height; cout << "New enter your weight in pounds (round to a whole number): "; cin >> weight; // calculate the bmi weight *= 703; height *= height; bmi = static_cast(weight) / height; // Output the results cout << name << ", your bmi is: " << bmi << endl; if (bmi < 18.5) cout << "This is considered underweight. "; else if (bmi < 25) cout << "This is a normal weight. "; else if (bmi < 30) cout << "This is considered overweight . "; else cout << "This is considered obese. "; return 0; }

Write a MIPS program that calculates bmi. Use the following C++ code as pseudocode. The variable bmi can be single or double precision.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!