Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Open with EKT 120 - Computer Programming Faculty of Electronic Engineering Technology SA 2020/2021 Semester 1 U MAP 4. Write a program that calculates the

image text in transcribed

Open with EKT 120 - Computer Programming Faculty of Electronic Engineering Technology SA 2020/2021 Semester 1 U MAP 4. Write a program that calculates the multiple body mass index (BMI) where the program read multiple weight and height and stored it into a parallel array weight [] and height[], then the program calculates and display BMI based on weight in kilograms (kg) and height in meters (m) based on the following formula: weight BMI = heightx height For each BMI values, display the weight status of underweight, normal, overweight, or obese, based on the following table: BMI = 46,0 Weight Status Underweight Normal Overweight Obese At the end of the program, determine the percentage of each weight status that have been calculated. The sample output should be as follows: : 1.72 100 Enter height (m) and weight (kg) Enter more? 'Y' for yes, 'N' for no Enter height (m) and weight (kg) Enter more? 'Y' for yes, 'N' for no : 1.56 79 : Y : 1.63 67 Enter height (m) and weight (kg) Enter more? 'Y' for yes, 'N' for no : 1.51 45 Enter height (m) and weight (kg) Enter more? 'Y' for yes, 'N' for no : 1.65 132 Enter height (m) and weight (kg) Enter more? 'Y' for yes, 'N' for no Enter height (m) and weight (kg) : 1.69 63 Enter more? 'Y' for yes, 'N' for no : N Height=1.72, Weight=100.00, BMI=33.80 Height=1.56, Weight= 79.00, BMI=32.46 Height=1.63, Weight= 67.00, BMI=25.22 Height-1.51, Weight= 45.00, BMI=19.74 Height=1.65, Weight=132.00, BMI=48.48 Height=1.69, Weight= 63.00, BMI=22.06 Percentage Underweight = 50.00 Percentage Normal = 33.33 Percentage Overweight = 0.00 Percentage Obese = 16.67 Page 818 + Open with EKT 120 - Computer Programming Faculty of Electronic Engineering Technology SA 2020/2021 Semester 1 U MAP 4. Write a program that calculates the multiple body mass index (BMI) where the program read multiple weight and height and stored it into a parallel array weight [] and height[], then the program calculates and display BMI based on weight in kilograms (kg) and height in meters (m) based on the following formula: weight BMI = heightx height For each BMI values, display the weight status of underweight, normal, overweight, or obese, based on the following table: BMI = 46,0 Weight Status Underweight Normal Overweight Obese At the end of the program, determine the percentage of each weight status that have been calculated. The sample output should be as follows: : 1.72 100 Enter height (m) and weight (kg) Enter more? 'Y' for yes, 'N' for no Enter height (m) and weight (kg) Enter more? 'Y' for yes, 'N' for no : 1.56 79 : Y : 1.63 67 Enter height (m) and weight (kg) Enter more? 'Y' for yes, 'N' for no : 1.51 45 Enter height (m) and weight (kg) Enter more? 'Y' for yes, 'N' for no : 1.65 132 Enter height (m) and weight (kg) Enter more? 'Y' for yes, 'N' for no Enter height (m) and weight (kg) : 1.69 63 Enter more? 'Y' for yes, 'N' for no : N Height=1.72, Weight=100.00, BMI=33.80 Height=1.56, Weight= 79.00, BMI=32.46 Height=1.63, Weight= 67.00, BMI=25.22 Height-1.51, Weight= 45.00, BMI=19.74 Height=1.65, Weight=132.00, BMI=48.48 Height=1.69, Weight= 63.00, BMI=22.06 Percentage Underweight = 50.00 Percentage Normal = 33.33 Percentage Overweight = 0.00 Percentage Obese = 16.67 Page 818 +

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

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

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions