lcy
import java.util.Scanner;
public class BMI {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("请输入你的身高(米):");
double height = in.nextDouble();
System.out.println("请输入你的体重(千克):");
int weight = in.nextInt();
// double height = 1.72;
// int weight = 70;
double exponent = weight/(height*height);
System.out.println("你的身高为"+height+"米");
System.out.println("你的体重为"+weight+"千克");
System.out.println("你的BMI质数为"+exponent);
if (exponent<18.5) {
System.out.println("体重过轻");
}else if(exponent>=18.5&&exponent<=24.9) {
System.out.println("正常范围");
}else if (exponent>24.9&&exponent<=29.9) {
System.out.println("体重过重");
}else {
System.out.println("肥胖");
}
in.colse();
}
}