import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); double height = scanner.nextDouble(); double weight = scanner.nextDouble(); //write your code here...... scanner.close(); //我想着少定义一个bmi变量 System.out.print(weight/(height*height)<18.5 ? "偏瘦" : weight/(height*height)<20.9 ? "苗条" : weight/(height*height)<24.9 ? "适中" : "偏胖"); } }