Question
Body Mass Index (BMI) is a measure of body fat. It is calculated by dividing weight in pounds (lbs) by height in inches (in) squared
Body Mass Index (BMI) is a measure of body fat. It is calculated by dividing weight in pounds (lbs) by height in inches (in) squared and multiplying by a conversion factor of 703. = () [ ()] 2 703 The values of BMI are interpreted as follows: BMI Category Below 18.5 Underweight 18.5 24.9 Normal 25.0 29.9 Overweight 30.0 and Above Obese Write a complete VB program to compute BMI that reads inches and pound from a file data.txt. It contains first number for height and second number for weight. Use your height and weight to store the values inside this file. The program reads the height and weight from a file and calculate BMI using the equation given above. It then finds the category based on the table shown above. The program will print the result (BMI and category) on the screen and save it in the file BMI.txt as well. Round the BMI value to 1 decimal place before finding the category. Make sure the input file exists, otherwise exit the program after giving an error message. Your program must define a constant for conversion factor of 703. Write your name and ID as comments at the beginning of your program and also write in the output file BMI.txt at the end. Assume the file is not empty and has valid inputs. data.txt BMI.txt 63.1 149.3 The BMI value is 26.4 The category is Overweight S
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