import java.util.Scanner; public class DietAdvisor { public static void main(String[] a) { Scanner sc = new Scanner(System.in); System.out.println("what is your height"); double h = sc.nextDouble(); System.out.println("what is your weight"); double w = sc.nextDouble(); boolean advise_given = false; if (h < 1.50 && w > 70.0) { System.out.println("Eat less!"); advise_given = true; } if (h > 1.90 && w < 60.0) { System.out.println("Eat more!"); advise_given = true; } if (h < 0.50 || h > 2.50) { System.out.println("I don't believe that!"); advise_given = true; } if (!advise_given) { System.out.println("I think you're doing fine!"); } } }