// Helene Martin, CSE 142 // This unstructured program computes one person's body mass index and // displays their weight status. import java.util.*; // for Scanner public class BMICalculator1 { public static void main(String[] args) { System.out.println("This program reads in data for two people and"); System.out.println("computes their body mass index (BMI)"); System.out.println(); Scanner s = new Scanner(System.in); System.out.println("Enter next person's information"); System.out.print("height (in inches): "); double height = s.nextDouble(); System.out.print("weight (in pounds): "); double weight = s.nextDouble(); double bmi = 703 * (weight / Math.pow(height, 2)); System.out.println("Person 1 BMI = " + bmi); if(bmi < 18.5) { System.out.println("underweight"); } else if(bmi < 25) { System.out.println("normal"); } else if(bmi < 30) { System.out.println("overweight"); } else { System.out.println("obese"); } } }