This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class Body { | |
| public static void MassIndex(double height,double weight){ | |
| double bmi= weight/(height * height); | |
| if (bmi < 18.5){ | |
| System.out.print("体重过轻:低于18.5"); | |
| }else if(bmi >=18.5 && bmi <= 24.9){ | |
| System.out.print("正常:在18.5-255之间"); | |
| }else if(bmi >=25.0 && bmi <= 29.9){ |