臭傻逼陈蒙
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import java.util.Scanner;
|
||||
public class Jun,13th,2024{
|
||||
public static void main(String args[]){
|
||||
Scanner sc=new Scanner(System.in);
|
||||
System.out.print("enter your height (m) :");
|
||||
System.out.println();
|
||||
double height=sc.nextDouble();
|
||||
System.out.print("enter your weight (kg) :");
|
||||
double weight=sc.nextDouble();
|
||||
System.out.println();
|
||||
if(height>2.5||weight>150){
|
||||
System.out.println("please enter a reasonable data");
|
||||
}
|
||||
double bmi=weight/height*height;
|
||||
if(bmi<18.5){
|
||||
|
||||
}
|
||||
else if(bmi>=18.5&&bmi<24){
|
||||
System.out.printf("bmi"+"%.3f"+"thin",bmi);
|
||||
}
|
||||
else if(bmi>=24&&bmi<27){
|
||||
System.out.printf("bmi"+"%.3f"+"normal",bmi);
|
||||
}
|
||||
else if(bmi>=27&&bmi<30){
|
||||
System.out.printf("bmi"+"%.3f"+"weight",bmi);
|
||||
}
|
||||
else if(bmi>=30&&bmi<35){
|
||||
System.out.printf("bmi"+"%.3f"+"overweight",bmi);
|
||||
}
|
||||
else{
|
||||
System.out.printf("bmi"+"%.3f"+"huge",bmi);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user