Question: 1. Write a C program that calculates the user's body mass index (BMI) and categorizes it as underweight, normal, overweight, or obese, based on the

 1. Write a C program that calculates the user's body massindex (BMI) and categorizes it as underweight, normal, overweight, or obese, based

1. Write a C program that calculates the user's body mass index (BMI) and categorizes it as underweight, normal, overweight, or obese, based on the flowing table from the U.S. Centers for Disease Control and Prevention: BMI Below 18.5 18.5-24.9 25.0-29.9 30.0 and above Weight Status Underweight Normal Overweight Obese Use the following formula to compute BMI (where w is weight in pounds and h is height in inches): 703 x w BMI h2 Your program should prompt the user and then input the weight in pounds and the height in inches. If your calculation determines that the person is overweight or obese, prompt the user and then input the amount of weight they would like to lose per week (in the range of 0.5 - 2 lbs. per week) and then print how many weeks it would take before their weight is in the normal range. If they input any illegal values for any inputs just print an error mes- sage and do nothing. You can exit the program using 'return 1'. 2. Modify your program to prompt the user and input a integer height and two integer weights (w], w2) and then print out their height (as feet and inches) plus a table showing the BMI values every 1/2 pound for every weight between wi and w2 (inclusive). Format your tables nicely so everything lines up properly. Floating point output should be rounded off to 2 digits after the decimal point. (continued on next page) To accomplish this you will need to use a while loop. Here is an example loop to output all the values between 1 and 10 inclusive: int i = 1; while(i

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!