题解 | #判断体重指数#
判断体重指数
https://www.nowcoder.com/practice/688f96cc38bb4a76996698d2f987b1b5
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
double high = in.nextDouble();
double weight = in.nextDouble();
in.close();
double BMI = weight/(high*high);
String s = BMI < 18.5 ? "偏瘦": BMI < 20.9
? "苗条": BMI <= 24.9
? "适中": "偏胖";
System.out.println(s);
}
}

