package Chapter_2;
import java.util.Scanner;
public class lianxi2_3 {
public static void main(String[] args) {
// TODO Auto-generated method stub
double weight;
double high;
Scanner input=new Scanner(System.in);
System.out.println("请输入您的体重(单位:千克)");
weight=input.nextDouble();
System.out.println("请输入你的身高(单位:米)");
high=input.nextDouble();
System.out.printf("你的BMI为:"+"%.2f",weight/(high*high));
}
}
计算BMI身体质量指数
最新推荐文章于 2023-02-26 20:13:11 发布