class healthy {
public static void main(String[] args) {
double height = 1.70;
int weight = 55;
double exponent = weight / (height * height);
System.out.println("你的体重为 " + weight);
System.out.println("你的身高为 " + height);
System.out.println("你的健康指标为 " + exponent);
if(exponent < 18.5) {
System.out.println("你的体重偏轻");
}
if (exponent >= 18.5 && exponent <= 24.9) {
System.out.println("你的体重正常");
}
if(exponent >= 24.9 && exponent <= 29.9) {
System.out.println("你的体重偏重");
}
if (exponent > 29.9) {
System.out.println("你的体重超标");
}
}
}