题解 | 判断体重指数
判断体重指数
https://www.nowcoder.com/practice/688f96cc38bb4a76996698d2f987b1b5
import java.util.*;
class Main
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
double weightPoint;
double height = sc.nextDouble();
double weight = sc.nextDouble();
weightPoint = weight/(height*height);
System.out.print(
weightPoint<18.5?"偏瘦" : weightPoint<20.9
?"苗条" : weightPoint<24.9
?"适中" : "偏胖"
);
}
}
海康威视公司福利 1262人发布
查看5道真题和解析