Question
Calculate the BMI (body mass index) of student based on their weight and height. (use formula of BMI). Determine and display the category of student
Calculate the BMI (body mass index) of student based on their weight and height. (use formula of BMI). Determine and display the category of student as follows. underweight BMI less than 18.5 Normal weight BMI between 18.5 and 24.9 overweight BMI between 25 and 29.9 obese BMI 30 and above The total number of students is unknown. Use suitable sentinel value to control the repetition. Calculate and display the number of students and the average BMI of all students. User-defined Functions: The program should provide the following functions: a. getBMI to calculate BMI. b. getStatus to determine the category based on BMI. Note: You may want to define other functions if necessary. Use appropriate parameters/ arguments, pass by value or pass by reference. You are not allowed to use global variables.
Calculate the BMI (body mass index) of student based on their weight and height. (use formula of BMI). Determine and display the category of student as follows. underweight Normal weight overweight obese BMI less than 18.5 BMI between 18.5 and 24.9 BMI between 25 and 29.9 BMI 30 and above The total number of students is unknown. Use suitable sentinel value to control the repetition. Calculate and display the number of students and the average BMI of all students. User-defined Functions: The program should provide the following functions: a. getBMI to calculate BMI. b. getStatus to determine the category based on BMI. Note: You may want to define other functions if necessary. Use appropriate parameters/ arguments, pass by value or pass by reference. You are not allowed to use global variables
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started