Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

attached is the lab and my code for part 1, touch up my code wherever you can AND DO PART 2 OF THE LAB ECET

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
attached is the lab and my code for part 1, touch up my code wherever you can AND DO PART 2 OF THE LAB
ECET 344 LAB \#1 PAGE.2 OF 2 INDIVIDUAL LAB - DRAW A FLOW CHART THAT DESCRIBES THE FLOW OF EACH EXERCISE. - MANUALLY WRITE THE PROGRAMS RELATED TO THE LAB EXERCISES BY HAND (PENCIL AND PAPER) AND REVIEW IT TO GET A SENSE OF ASSURANCE THAT YOU ARE PROGRAM WORKS. THEN. - START YOUR VISUAL STUDIO CREATING A NEW EMPTY PROJECT SPACE AND TAKE THE CODE FROM PAPER TO THE SCREEN USING THE C++ TEMPLATE WE DISCUSSED IN CLASS. NORMAL WEIGHT RANGES: BODY MASS INDEX (BMI) BODY MASS INDEX, OR BMI, IS A WAY TO HELP YOU FIGURE OUT IF YOU ARE AT A HEALTHY WEIGHT FOR YOUR HEIGHT. BMI IS A NUMBER BASED ON YOUR WEIGHT AND HEIGHT. IN GENERAL, THE HIGHER THE NUMBER, THE MORE BODY FAT A PERSON HAS. BMI IS OFTEN USED AS A SCREENING TOOL TO DECIDE IF YOUR WEIGHT MIGHT BE PUTTING YOU AT RISK FOR HEALTH PROBLEMS SUCH AS HEART DISEASE, DIABETES, AND CANCER. BMI IS USED TO BROADLY DEFINE DIFFERENT WEIGHT GROUPS IN ADULTS 20 YEARS OLD OR OLDER. THE SAME GROUPS APPLY TO BOTH MEN AND WOMEN. - UNDERWEIGHT: BMI IS LESS THAN 18.5 - NORMAL WEIGHT: BMI IS 18.5 TO 24.9 .OVERWEIGHT: BMI IS 25 TO 29.9 -OBESE: BMI IS 30 OR MORE EXAMPLES - A WOMAN WHO IS 5FT.4 IN. TALL IS CONSIDERED OVERWEIGHT (BMI IS 25 TO 29) IF SHE WEIGHS BETWEEN ABOUT 145 AND 169 POUNDS. SHE IS CONSIDERED OBESE (BMI IS 30 OR MORE) IF SHE IS CLOSER TO 174 POUNDS OR MORE. - A MAN WHO IS 5 FT. 10 IN. TALL IS CONSIDERED OVERWEIGHT (BMI IS 25 TO 29) IF HE WEIGHS BETWEEN ABOUT 174 AND 202 POUNDS, AND IS ORESF (RMI IS 30 OR MORE) IE HE IS CIOSER TO 200 OBESE (BMI IS 30 OR MORE) IF HE IS CLOSER TO 209 POUNDS OR MORE. LAB EXERCISE ONE: THE ACTUAL FORMULA TO DETERMINE BMI USES METRIC SYSTEM MEASUREMENTS: WEIGHT IN KILOGRAMS (kg) DIVIDED BY HEIGHT IN METERS, SQUARED (m2) : WHEN USING POUNDS AND INCHES, THE FORMULA NEEDS TO BE ALTERED SLIGHTLY. MULTIPLY YOUR WEIGHT IN POUNDS BY 703. DIVIDE THAT BY YOUR HEIGHT IN INCHES, SQUARED: FOR EXAMPLE, IF YOU WEIGH 120 POUNDS AND ARE 5 FT. 3 IN. (63 in.) TALL: THIS IS WELL WITHIN THE HEALTHY WEIGHT RANGE. LAB EXERCISE TWO: THE PROGRAM SHOULD DECIDE IF THE BMI CALCULATED IS: - UNDERWEIGHT: BMI IS LESS THAN 18.5 - NORMAL WEIGHT: BMI IS 18.5 TO 24.9 - OVERWEIGHT: BMI IS 25 TO 29.9 - OBESE: BMI IS 30 OR MORE 1 Comment Block/Header */ \#include \#include > \#include \#include using namespace std; int main() \{ //declaration float bmi; float si_height =0; float si_weight =0; float im_height =0; float im_weight =0; char unit =1% //initialization bmi =0; //part 1 //1. educate the user what the program does cout "This program is used by health professionals to calculate body mass index (BMI)" endl; //2. ask the user about the units he is using (si/im) I/3. capture user responce (cin) //4. ask for the user's height (in/cm) II5. if si is selected calculate in //6. ask the user for weight (pounds/kg) II7. convert from (si to in) cout "Which units are you using for your height and weight? Enter s for si units or i for im units" endl; cin > >nit; switch (unit) \{ case s:{ cout "Enter height in cm" endl; cin > si_height; cout "Enter weight in kg" endl; break; float bmi = si_weight / (pow(si_height, 2.0)); 3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genetic Databases

Authors: Martin J. Bishop

1st Edition

0121016250, 978-0121016258

More Books

Students also viewed these Databases questions

Question

What will you do or say to Anthony about this issue?

Answered: 1 week ago