Question: Question 1. Use if statements to write a Java program that prints out (outputs) a person's Body Mass Index (BMI) based on the following conditions
Question 1. Use if statements to write a Java program that prints out (outputs) a person's Body Mass Index (BMI) based on the following conditions BMI less than 18.5; output "underweight" BMI less than 25; output "norma" BMI less than 30; output "overweight" BMI greater than or equal to 30; output "obese" Note: Use if-then-else-if, where appropriate. Expected Output: normal Question 2. Modify the program written in Question 1 to do the following BMI less than 30; output "overweight" BMI greater than or equal to 30; output"obese" Note: receive BMI as input (take input using the Scanner class) Note: Use if-then-else, where appropriate Output: The program may operate like this (sample output): Enter BMI: 29 You entered BMI of 29.0 which is overweight
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
