/*** 在这里给出对类 BMIexponent 的描述。* * @作者(你的名字)* @版本(一个版本号或者一个日期)******/public class BMIexponent{public static void main(String[] args){double height = 1.74;int weight = 69;double exponent = weight/(height*height);System.out.println("您的身高为:"+ height);System.out.println("你的体重为:"+ weight);System.out.println("您的BMI指数为:"+ exponent);System.out.print("您的体重属于:");if (exponent<18.5){System.out.println("体重过轻");}if (exponent>=18.5){System.out.println("正常范围");}if (exponent>=24.9 && exponent < 29.9){System.out.println("体重过重");}if (exponent>29.9){System.out.println("肥胖");}}}
100字范文,内容丰富有趣,生活中的好帮手!